fix(mu4e): "no such file or directory: ~/.mbsyncrc"

In c647957 "~/.mbsyncrc" was passed to mbsync quoted, preventing ~ from
being expanded into $HOME. Now, I've chosen to omit the whole --config
option if $XDG_CONFIG_HOME/isyncrc isn't present, since mbsync will fall
back to ~/.mbsyncrc on its own.

Amend: c6479574e6
Fix: #8048
This commit is contained in:
Henrik Lissner 2024-09-05 14:50:17 -04:00
parent 03e5f1333c
commit 45310f1c3e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -36,11 +36,11 @@
(cond ((or (modulep! +mbsync)
(eq +mu4e-backend 'mbsync))
(setq mu4e-get-mail-command
(format "mbsync --all --config %S"
(concat "mbsync --all"
;; XDG support was added to isync 1.5, but this lets
;; users on older benefit from it sooner.
(or (file-exists-p! "isyncrc" (or (getenv "XDG_CONFIG_HOME") "~/.config"))
"~/.mbsyncrc"))
(when-let (file (file-exists-p! "isyncrc" (or (getenv "XDG_CONFIG_HOME") "~/.config")))
(format " --config %S" file)))
mu4e-change-filenames-when-moving t))
((or (modulep! +offlineimap)
(eq +mu4e-backend 'offlineimap))