refactor
This commit is contained in:
parent
d66c818c1e
commit
3fcb846eca
@ -80,19 +80,7 @@ void eviction::service_function() {
|
||||
continue;
|
||||
}
|
||||
|
||||
api_file file{};
|
||||
filesystem_item fsi{};
|
||||
if (provider_.get_filesystem_item_and_file(api_path, file, fsi) !=
|
||||
api_error::success) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto opt_size = utils::file::file{file_path}.size();
|
||||
if (not opt_size.has_value() || opt_size.value() != fsi.size) {
|
||||
continue;
|
||||
}
|
||||
|
||||
file_mgr_.evict_file(fsi.api_path);
|
||||
file_mgr_.evict_file(api_path);
|
||||
} catch (const std::exception &ex) {
|
||||
utils::error::raise_error(
|
||||
function_name, ex,
|
||||
|
Loading…
x
Reference in New Issue
Block a user