@@ -23,9 +23,6 @@ using std::endl;
2323
2424namespace PokemonAutomation {
2525
26- namespace fs = std::filesystem;
27-
28-
2926
3027
3128DownloadThread::~DownloadThread (){
@@ -104,7 +101,7 @@ void DownloadThread::run_download(DownloadedResourceMetadata resource_metadata){
104101 try {
105102
106103 // delete directory and the old resource
107- fs ::remove_all (Filesystem::Path ( resource_directory) );
104+ Filesystem ::remove_all (resource_directory);
108105
109106 // download
110107 std::string zip_path = resource_directory + " /temp.zip" ;
@@ -122,7 +119,7 @@ void DownloadThread::run_download(DownloadedResourceMetadata resource_metadata){
122119 // hash
123120 std::string hash =
124121 hash_file (
125- * this ,
122+ this ,
126123 zip_path,
127124 [this ](uint64_t bytes_done, uint64_t total_bytes){
128125 m_hooks.report_hash_progress (bytes_done, total_bytes);
@@ -149,23 +146,23 @@ void DownloadThread::run_download(DownloadedResourceMetadata resource_metadata){
149146 );
150147
151148 // delete old zip file
152- fs ::remove (Filesystem::Path ( zip_path) );
149+ Filesystem ::remove (zip_path);
153150
154151 throw_if_cancelled ();
155152
156153 }catch (OperationCancelledException&){
157154 // delete directory and the resource
158- fs ::remove_all (Filesystem::Path ( resource_directory) );
155+ Filesystem ::remove_all (resource_directory);
159156
160157 throw ;
161158 }catch (OperationFailedException&){
162159 // delete directory and the resource
163- fs ::remove_all (Filesystem::Path ( resource_directory) );
160+ Filesystem ::remove_all (resource_directory);
164161
165162 throw ;
166163 }catch (...){
167164 // delete directory and the resource
168- fs ::remove_all (Filesystem::Path ( resource_directory) );
165+ Filesystem ::remove_all (resource_directory);
169166
170167 throw ;
171168 }
0 commit comments