--- nnmaildir.el 19 May 2008 10:47:42 +0200 7.20 +++ nnmaildir.el 18 Jul 2009 13:09:43 +0200 @@ -152,6 +152,12 @@ (gnm nil) ;; flag: split from mail-sources? (target-prefix nil :type string)) ;; symlink target prefix +(defun nnmaildir--sync () + (if (fboundp 'unix-sync) + (unix-sync) ;; no fsync :( + (gnus-message + 1 "nnmaildir: `unix-sync' not supported on this platform."))) + (defun nnmaildir--expired-article (group article) (setf (nnmaildir--art-nov article) nil) (let ((flist (nnmaildir--grp-flist group)) @@ -1293,7 +1299,7 @@ (set-buffer buffer) (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 'excl)) - (unix-sync) ;; no fsync :( + (nnmaildir--sync) ;; no fsync :( (rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace) t))) @@ -1387,7 +1393,7 @@ (error (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 'excl) - (unix-sync))) ;; no fsync :( + (nnmaildir--sync))) ;; no fsync :( (nnheader-cancel-timer 24h) (condition-case err (add-name-to-file tmpfile curfile)