Skip to content

Commit

Permalink
One overlooked error condition
Browse files Browse the repository at this point in the history
  • Loading branch information
nalinigans committed Nov 22, 2024
1 parent e09c077 commit 0be03ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/c_api/tiledb_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ int cache_fragment_metadata(const std::string& workspace, const std::string& arr
}
free(buffer);
if (unlock_file(fd)) {
if (posix_fs.is_file(bookkeeping_path)) {
posix_fs.delete_file(bookkeeping_path);

Check warning on line 296 in core/src/c_api/tiledb_utils.cc

View check run for this annotation

Codecov / codecov/patch

core/src/c_api/tiledb_utils.cc#L295-L296

Added lines #L295 - L296 were not covered by tests
}
RETURN_ERRMSG_PATH("Could not close file", bookkeeping_path);

Check warning on line 298 in core/src/c_api/tiledb_utils.cc

View check run for this annotation

Codecov / codecov/patch

core/src/c_api/tiledb_utils.cc#L298

Added line #L298 was not covered by tests
}
assert(posix_fs.file_size(cached_file) == size);
Expand Down

0 comments on commit 0be03ae

Please sign in to comment.