Skip to content

Commit

Permalink
Merge pull request #15 from adam-p/check-failbit
Browse files Browse the repository at this point in the history
check the failbit after closing the datastore file
  • Loading branch information
adam-p authored Nov 9, 2021
2 parents 64bf896 + e2562ee commit d0f74c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datastore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ static Error FileStore(int transaction_depth, const string& file_path, const jso

f.close();

if (f.fail()) {
return MakeCriticalError(utils::Stringer("temp_file_path close failed; errno=", errno));
}

/*
Rename temp to commit
*/
Expand Down

0 comments on commit d0f74c9

Please sign in to comment.