This commit is contained in:
2024-12-24 21:29:14 -06:00
parent 0c31cc217f
commit 587c0559b5

View File

@ -558,13 +558,15 @@ auto file_manager::remove_file(const std::string &api_path) -> api_error {
upload_notify_.notify_all();
upload_lock.unlock();
recur_mutex_lock open_lock(open_file_mtx_);
unique_recur_mutex_lock open_lock(open_file_mtx_);
res = provider_.remove_file(api_path);
if (res != api_error::success) {
return res;
}
open_lock.unlock();
remove_source_and_shrink_cache(api_path, fsi.source_path, fsi.size,
allocated);
return api_error::success;