diff options
Diffstat (limited to 'worker/imap/search.go')
-rw-r--r-- | worker/imap/search.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/worker/imap/search.go b/worker/imap/search.go index f866b1c..46a25c7 100644 --- a/worker/imap/search.go +++ b/worker/imap/search.go @@ -11,6 +11,9 @@ import ( func parseSearch(args []string) (*imap.SearchCriteria, error) { criteria := imap.NewSearchCriteria() + if len(args) == 0 { + return criteria, nil + } opts, optind, err := getopt.Getopts(args, "rubax:X:t:H:f:c:") if err != nil { |