refactor
This commit is contained in:
parent
e5c690eb89
commit
fbe4df0251
@ -525,16 +525,6 @@ void file_manager::remove_upload(const std::string &api_path, bool no_lock) {
|
||||
}
|
||||
}
|
||||
|
||||
void file_manager::swap_renamed_items(std::string from_api_path,
|
||||
std::string to_api_path) {
|
||||
auto file_iter = open_file_lookup_.find(from_api_path);
|
||||
if (file_iter != open_file_lookup_.end()) {
|
||||
open_file_lookup_[to_api_path] = open_file_lookup_[from_api_path];
|
||||
open_file_lookup_.erase(from_api_path);
|
||||
open_file_lookup_[to_api_path]->set_api_path(to_api_path);
|
||||
}
|
||||
}
|
||||
|
||||
auto file_manager::rename_directory(const std::string &from_api_path,
|
||||
const std::string &to_api_path)
|
||||
-> api_error {
|
||||
@ -855,6 +845,16 @@ void file_manager::store_resume(const i_open_file &file) {
|
||||
}
|
||||
}
|
||||
|
||||
void file_manager::swap_renamed_items(std::string from_api_path,
|
||||
std::string to_api_path) {
|
||||
auto file_iter = open_file_lookup_.find(from_api_path);
|
||||
if (file_iter != open_file_lookup_.end()) {
|
||||
open_file_lookup_[to_api_path] = open_file_lookup_[from_api_path];
|
||||
open_file_lookup_.erase(from_api_path);
|
||||
open_file_lookup_[to_api_path]->set_api_path(to_api_path);
|
||||
}
|
||||
}
|
||||
|
||||
void file_manager::upload_completed(const file_upload_completed &evt) {
|
||||
unique_mutex_lock upload_lock(upload_mtx_);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user