From 1f5eaa452ba0d69708ce420c3c82af9f2c501909 Mon Sep 17 00:00:00 2001 From: Cian Gallagher Date: Fri, 31 Dec 2021 13:30:09 +0000 Subject: [PATCH] EVENT: Add check to determine is path is actually a directory. --- event/event.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event/event.go b/event/event.go index 9f073b2..0d9e8a7 100644 --- a/event/event.go +++ b/event/event.go @@ -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 }