diff options
Diffstat (limited to 'worker/notmuch')
-rw-r--r-- | worker/notmuch/worker.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go index 486312a1..374a20b7 100644 --- a/worker/notmuch/worker.go +++ b/worker/notmuch/worker.go @@ -920,10 +920,16 @@ func (w *worker) handleCreateDirectory(msg *types.CreateDirectory) error { } func (w *worker) handleRemoveDirectory(msg *types.RemoveDirectory) error { - if w.store == nil { + _, inQueryMap := w.nameQueryMap[msg.Directory] + if inQueryMap { return errUnsupported } + if w.store == nil { + w.done(msg) + return nil + } + dir := w.store.Dir(msg.Directory) if err := os.RemoveAll(string(dir)); err != nil { w.w.Errorf("could not remove directory %s: %v", |