diff options
Diffstat (limited to 'worker/maildir')
-rw-r--r-- | worker/maildir/worker.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go index 099a85c1..621b19e3 100644 --- a/worker/maildir/worker.go +++ b/worker/maildir/worker.go @@ -71,8 +71,11 @@ func (w *Worker) handleAction(action types.WorkerMessage) { } func (w *Worker) handleFSEvent(ev fsnotify.Event) { - // we only care about files being created or removed - if ev.Op != fsnotify.Create && ev.Op != fsnotify.Remove { + // we only care about files being created, removed or renamed + switch ev.Op { + case fsnotify.Create, fsnotify.Remove, fsnotify.Rename: + break + default: return } // if there's not a selected directory to rescan, ignore |