]> git.eshelyaron.com Git - emacs.git/commitdiff
Suppress warning about unix-sync in nnmaildir.el
authorArash Esbati <arash@gnu.org>
Tue, 25 Jun 2019 21:24:47 +0000 (23:24 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 25 Jun 2019 21:24:47 +0000 (23:24 +0200)
* nnmaildir.el (nnmaildir-request-replace-article): Check if the
function `unix-sync' is bound before running it.

lisp/gnus/nnmaildir.el

index ac125c905a54d72b20a0fd5b31be79732965d997..3becee35112bd296b24e5ddb0095e77bef6d40d9 100644 (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)))