This commit is contained in:
2024-12-24 13:46:09 -06:00
parent dd00ea4439
commit ae5bdb490d

View File

@ -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");