diff options
Diffstat (limited to 'src/flatfile.cpp')
-rw-r--r-- | src/flatfile.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/flatfile.cpp b/src/flatfile.cpp index 59861a08ad..2bff663d8b 100644 --- a/src/flatfile.cpp +++ b/src/flatfile.cpp @@ -82,15 +82,18 @@ bool FlatFileSeq::Flush(const FlatFilePos& pos, bool finalize) { FILE* file = Open(FlatFilePos(pos.nFile, 0)); // Avoid fseek to nPos if (!file) { - return error("%s: failed to open file %d", __func__, pos.nFile); + LogError("%s: failed to open file %d\n", __func__, pos.nFile); + return false; } if (finalize && !TruncateFile(file, pos.nPos)) { fclose(file); - return error("%s: failed to truncate file %d", __func__, pos.nFile); + LogError("%s: failed to truncate file %d\n", __func__, pos.nFile); + return false; } if (!FileCommit(file)) { fclose(file); - return error("%s: failed to commit file %d", __func__, pos.nFile); + LogError("%s: failed to commit file %d\n", __func__, pos.nFile); + return false; } DirectoryCommit(m_dir); |