mu4e: lock file may not be created by file watcher
On some OS implementations (e.g. BSD uses kqueue), `file-notify-add-watch' might not create the file if it doesn't exist. This patch fixes that error. Arguably, emacs lisp should ensure the same behaviour exists across each implementation.
This commit is contained in:
parent
bfa888ced3
commit
3778862a79
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ Else, write to this process' PID to the lock file"
|
|||
(user-error "Unfortunately another Emacs is already doing stuff with Mu4e, and you can only have one at a time")
|
||||
(write-region (number-to-string (emacs-pid)) nil +mu4e-lock-file)
|
||||
(delete-file +mu4e-lock-request-file)
|
||||
(call-process "touch" nil nil nil +mu4e-lock-request-file)
|
||||
(funcall orig-fun callback)
|
||||
(setq +mu4e-lock--request-watcher
|
||||
(file-notify-add-watch +mu4e-lock-request-file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue