Skip to content

Commit

Permalink
EVENT: Add check to determine is path is actually a directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Dec 31, 2021
1 parent 231a360 commit 1f5eaa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (e *Event) IsValidEvent(ext string) bool {

// IsNewDirEvent returns a bool if the given path is a directory or not
func (e *Event) IsNewDirEvent() bool {
if e.Ext == "" && utils.ValidatePath(e.Path) {
if e.Ext == "" && utils.ValidatePath(e.Path) && utils.IsDir(e.Path) {
return true
}

Expand Down

0 comments on commit 1f5eaa4

Please sign in to comment.