]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Rework fsync patch for win32
authorEric Bollengier <eric@baculasystems.com>
Mon, 1 Apr 2019 13:27:00 +0000 (15:27 +0200)
committerRadosław Korzeniewski <radekk@inteos.pl>
Sat, 14 Dec 2019 14:55:28 +0000 (15:55 +0100)
bacula/src/stored/dev.c

index 1086695d612601c9ecc103e35dd337c5902e2ee0..b8367ceb6b23f72e81e1dc2dc9c7528752d23d8d 100644 (file)
@@ -261,11 +261,9 @@ void DEVICE::set_volcatinfo_from_dcr(DCR *dcr)
 
 bool DEVICE::sync_data(DCR *dcr)
 {
-   int ret;
-#ifdef HAVE_WIN32
-   return false;
-#endif
+   int ret=false;
 
+#ifndef HAVE_WIN32
    if (!has_cap(CAP_SYNCONCLOSE)) {
        return true;
    }
@@ -286,7 +284,9 @@ bool DEVICE::sync_data(DCR *dcr)
            VolHdr.VolumeName, print_name(), be.bstrerror());
       return false;
    }
-   return true;
+   ret = true;
+#endif
+   return ret;
 }
 
 /*