diff src/fileio.c @ 36:125e80798a85 v7.0021

updated for version 7.0021
author vimboss
date Thu, 09 Dec 2004 21:34:53 +0000
parents f6033dcbaf31
children 410fa1a31baf
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3985,8 +3985,9 @@ restore_backup:
      * journalled.  Syncing the file slows down the system, but assures it has
      * been written to disk and we don't lose it.
      * For a device do try the fsync() but don't complain if it does not work
-     * (could be a pipe). */
-    if (fsync(fd) != 0 && !device)
+     * (could be a pipe).
+     * If the 'fsync' option is FALSE, don't fsync().  Useful for laptops. */
+    if (p_fs && fsync(fd) != 0 && !device)
     {
 	errmsg = (char_u *)_("E667: Fsync failed");
 	end = 0;