main.cc: Only sync() if we can.
This commit is contained in:
parent
97b48ccb12
commit
4bad431c90
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue