Skip to content

Commit

Permalink
Close #8: Properly quote shell arguments for mu find process
Browse files Browse the repository at this point in the history
When a maildir folder contains spaces, or some other special
characters, the command line of `mu find` process for that folder gets
broken.  Fix that by quoting all arguments.

Thanks to PozDarek (darekce) for debugging and finding a fix.

* mu4e-overview.el (mu4e-overview--count): Escape arguments when
formatting `mu find` command line.
  • Loading branch information
mkcms committed Oct 21, 2023
1 parent 3a0016c commit 18b74e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mu4e-overview.el
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ passed to CALLBACK will be 0."
"mu4e-overview-maildir-counter" nil
(format "%s find -f p '%s' %s | wc -l"
mu4e-mu-binary
(format "maildir:/%s" maildir)
(format "maildir:/%s" (shell-quote-argument maildir))
(if unread-only " and flag:unread" "")))))

(set-process-filter
Expand Down

0 comments on commit 18b74e2

Please sign in to comment.