From: Eric Bollengier Date: Mon, 1 Apr 2019 13:27:00 +0000 (+0200) Subject: Rework fsync patch for win32 X-Git-Tag: Release-9.6.0~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a68fdf040377b7a994edc5295b9308ef12cf56f9;p=thirdparty%2Fbacula.git Rework fsync patch for win32 --- diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index 1086695d6..b8367ceb6 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -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; } /*