(nnmaildir-request-accept-article): Don't call `unix-sync' unless it's defined.
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 31 Jul 2011 16:31:09 +0000 (18:31 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 31 Jul 2011 16:31:09 +0000 (18:31 +0200)
lisp/ChangeLog
lisp/nnmaildir.el

index 1aecb80..9730c35 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-31  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * nnmaildir.el (nnmaildir-request-accept-article): Don't call
+       `unix-sync' unless it's defined.
+
 2011-07-31  Marcus Harnisch  <marcus.harnisch@gmx.net>  (tiny change)
 
        * gnus-art.el (gnus-article-stop-animations): Use `elt' instead of
index 8e2cd4b..bbace7c 100644 (file)
@@ -1381,7 +1381,8 @@ by nnmaildir-request-article.")
        (error
         (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil
                           'excl)
-        (unix-sync))) ;; no fsync :(
+        (when (fboundp 'unix-sync)
+          (unix-sync)))) ;; no fsync :(
       (nnheader-cancel-timer 24h)
       (condition-case err
          (add-name-to-file tmpfile curfile)