refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...

This commit is contained in:
2024-12-24 21:34:40 -06:00
parent aab3d8866e
commit 2ce86e1498

View File

@ -197,17 +197,8 @@ auto open_file::close() -> bool {
return true;
}
if (allocated) {
file_manager::remove_source_and_shrink_cache(
fsi_.api_path, fsi_.source_path, fsi_.size, allocated);
} else {
auto file = utils::file::file{fsi_.source_path};
if (not file.remove()) {
utils::error::raise_api_path_error(
function_name, fsi_.api_path, fsi_.source_path,
utils::get_last_error_code(), "failed to delete source file");
}
}
file_manager::remove_source_and_shrink_cache(fsi_.api_path, fsi_.source_path,
fsi_.size, allocated);
auto parent = utils::path::get_parent_path(fsi_.source_path);
fsi_.source_path =