diff --git a/datastore.cpp b/datastore.cpp index 8869289..d91ff34 100644 --- a/datastore.cpp +++ b/datastore.cpp @@ -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 */