refactor
This commit is contained in:
@ -558,13 +558,15 @@ auto file_manager::remove_file(const std::string &api_path) -> api_error {
|
|||||||
upload_notify_.notify_all();
|
upload_notify_.notify_all();
|
||||||
upload_lock.unlock();
|
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);
|
res = provider_.remove_file(api_path);
|
||||||
if (res != api_error::success) {
|
if (res != api_error::success) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open_lock.unlock();
|
||||||
|
|
||||||
remove_source_and_shrink_cache(api_path, fsi.source_path, fsi.size,
|
remove_source_and_shrink_cache(api_path, fsi.source_path, fsi.size,
|
||||||
allocated);
|
allocated);
|
||||||
return api_error::success;
|
return api_error::success;
|
||||||
|
Reference in New Issue
Block a user