Suppress warning about unix-sync in nnmaildir.el

* nnmaildir.el (nnmaildir-request-replace-article): Check if the
function `unix-sync' is bound before running it.
This commit is contained in:
Arash Esbati 2019-06-25 23:24:47 +02:00 committed by Lars Ingebrigtsen
parent 3942821425
commit 52e17e53b7

View file

@ -1396,7 +1396,8 @@ This variable is set by `nnmaildir-request-article'.")
(with-current-buffer buffer
(write-region (point-min) (point-max) tmpfile nil 'no-message nil
'excl))
(unix-sync) ;; no fsync :(
(when (fboundp 'unix-sync)
(unix-sync)) ;; no fsync :(
(rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace)
t)))