refactor
This commit is contained in:
		| @@ -457,26 +457,31 @@ 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) { | ||||||
|       if (utils::string::to_bool(meta[META_DIRECTORY])) { |       continue; | ||||||
|         bool exists{}; |     } | ||||||
|         if (is_directory(api_path, exists) != api_error::success) { |  | ||||||
|           continue; |     if (utils::string::to_bool(meta[META_DIRECTORY])) { | ||||||
|         } |       bool exists{}; | ||||||
|         if (not exists) { |       if (is_directory(api_path, exists) != api_error::success) { | ||||||
|           removed_list.emplace_back(removed_item{api_path, true, ""}); |  | ||||||
|         } |  | ||||||
|         continue; |         continue; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       bool exists{}; |  | ||||||
|       if (is_file(api_path, exists) != api_error::success) { |  | ||||||
|         continue; |  | ||||||
|       } |  | ||||||
|       if (not exists) { |       if (not exists) { | ||||||
|         removed_list.emplace_back( |         removed_list.emplace_back(removed_item{api_path, true, ""}); | ||||||
|             removed_item{api_path, false, meta[META_SOURCE]}); |  | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  |       continue; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     bool exists{}; | ||||||
|  |     if (is_file(api_path, exists) != api_error::success) { | ||||||
|  |       continue; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     if (not exists) { | ||||||
|  |       removed_list.emplace_back( | ||||||
|  |           removed_item{api_path, false, meta[META_SOURCE]}); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user