refactor
This commit is contained in:
		| @@ -457,15 +457,20 @@ void base_provider::remove_deleted_files() { | |||||||
|  |  | ||||||
|   for (auto &&api_path : db3_->get_api_path_list()) { |   for (auto &&api_path : db3_->get_api_path_list()) { | ||||||
|     api_meta_map meta{}; |     api_meta_map meta{}; | ||||||
|     if (get_item_meta(api_path, meta) == api_error::success) { |     if (get_item_meta(api_path, meta) != api_error::success) { | ||||||
|  |       continue; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     if (utils::string::to_bool(meta[META_DIRECTORY])) { |     if (utils::string::to_bool(meta[META_DIRECTORY])) { | ||||||
|       bool exists{}; |       bool exists{}; | ||||||
|       if (is_directory(api_path, exists) != api_error::success) { |       if (is_directory(api_path, exists) != api_error::success) { | ||||||
|         continue; |         continue; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       if (not exists) { |       if (not exists) { | ||||||
|         removed_list.emplace_back(removed_item{api_path, true, ""}); |         removed_list.emplace_back(removed_item{api_path, true, ""}); | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       continue; |       continue; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -473,12 +478,12 @@ void base_provider::remove_deleted_files() { | |||||||
|     if (is_file(api_path, exists) != api_error::success) { |     if (is_file(api_path, exists) != api_error::success) { | ||||||
|       continue; |       continue; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (not exists) { |     if (not exists) { | ||||||
|       removed_list.emplace_back( |       removed_list.emplace_back( | ||||||
|           removed_item{api_path, false, meta[META_SOURCE]}); |           removed_item{api_path, false, meta[META_SOURCE]}); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   } |  | ||||||
|  |  | ||||||
|   for (auto &&item : removed_list) { |   for (auto &&item : removed_list) { | ||||||
|     if (item.directory) { |     if (item.directory) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user