This commit is contained in:
@ -197,17 +197,8 @@ auto open_file::close() -> bool {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allocated) {
|
file_manager::remove_source_and_shrink_cache(fsi_.api_path, fsi_.source_path,
|
||||||
file_manager::remove_source_and_shrink_cache(
|
fsi_.size, allocated);
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto parent = utils::path::get_parent_path(fsi_.source_path);
|
auto parent = utils::path::get_parent_path(fsi_.source_path);
|
||||||
fsi_.source_path =
|
fsi_.source_path =
|
||||||
|
Reference in New Issue
Block a user