main.cc: Only sync() if we can.

This commit is contained in:
Ryan Pavlik 2011-10-28 12:15:48 -05:00
parent 97b48ccb12
commit 4bad431c90

View file

@ -373,10 +373,11 @@ void setupConfigFiles(const std::string& dirname, const std::string& rc) {
sync_fs = true;
}
}
#ifdef HAVE_SYNC
if (sync_fs) {
sync();
}
#endif
}
@ -413,7 +414,9 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) {
<< commandargs
<< "' failed." << endl;
}
#ifdef HAVE_SYNC
sync();
#endif // HAVE_SYNC
}
}