about summary refs log tree commit diff stats
path: root/worker
diff options
context:
space:
mode:
Diffstat (limited to 'worker')
-rw-r--r--worker/maildir/worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index 2f96e6f..34d73f8 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -136,7 +136,6 @@ func (w *Worker) getDirectoryInfo(name string) *models.DirectoryInfo {
 		w.worker.Logger.Printf("could not get uids: %v", err)
 		return dirInfo
 	}
-	dirInfo.Exists = len(uids)
 
 	recent, err := dir.UnseenCount()
 	if err != nil {
@@ -166,6 +165,7 @@ func (w *Worker) getDirectoryInfo(name string) *models.DirectoryInfo {
 		}
 	}
 	dirInfo.Unseen += dirInfo.Recent
+	dirInfo.Exists = len(uids) + recent
 	return dirInfo
 }