fix
This commit is contained in:
@ -564,9 +564,8 @@ auto file_manager::remove_file(const std::string &api_path) -> api_error {
|
||||
}
|
||||
|
||||
auto file = utils::file::file{fsi.source_path};
|
||||
auto file_size = file.size().value_or(0U);
|
||||
if (file.remove()) {
|
||||
res = cache_size_mgr::instance().shrink(file_size);
|
||||
res = cache_size_mgr::instance().shrink(fsi.size);
|
||||
if (res != api_error::success) {
|
||||
utils::error::raise_api_path_error(function_name, api_path, res,
|
||||
"failed to shrink cache");
|
||||
|
Reference in New Issue
Block a user