aboutsummaryrefslogtreecommitdiff
path: root/worker
diff options
context:
space:
mode:
Diffstat (limited to 'worker')
-rw-r--r--worker/maildir/worker.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index aa54af5..533bb7c 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -202,6 +202,10 @@ func (w *Worker) handleOpenDirectory(msg *types.OpenDirectory) error {
return fmt.Errorf("could not add watch to directory: %v", err)
}
+ if err := dir.Clean(); err != nil {
+ return fmt.Errorf("could not clean directory: %v", err)
+ }
+
// TODO: why does this need to be sent twice??
info := &types.DirectoryInfo{
Info: &models.DirectoryInfo{