1212#define _FILE_OFFSET_BITS 64
1313#endif
1414
15- // #include "miniz-cpp/zip_file.hpp"
1615
1716#include " miniz-3.1.1/miniz.h"
18- // #include "3rdParty/miniz-3.1.1/miniz .h"
17+ #include " Common/Cpp/Filesystem .h"
1918#include " Common/Cpp/Exceptions.h"
2019#include " FileUnzip.h"
2120#include < filesystem>
@@ -70,12 +69,12 @@ namespace PokemonAutomation{
7069 try {
7170 // 1. Get absolute, normalized paths
7271 // handles symlinks. and resolves .. and . components. throws error if path doesn't exist
73- fs::path base = fs::canonical (target_dir);
72+ Filesystem::Path base = fs::canonical (Filesystem::Path ( target_dir) );
7473 // confirms that base is a directory, and not a file
7574 if (!fs::is_directory (base)) return false ;
7675
7776 // resolves .. and . components and returns an absolute path without requiring the final path to exist.
78- fs::path target = fs::weakly_canonical (base / entry_name);
77+ fs::path target = fs::weakly_canonical (Filesystem::Path ( base / entry_name) );
7978
8079 // cout << base << endl;
8180 // cout << target << endl;
@@ -99,7 +98,7 @@ namespace PokemonAutomation{
9998 }
10099
101100 void unzip_file (const char * zip_path, const char * target_dir) {
102- fs::path p{zip_path};
101+ Filesystem::Path p{zip_path};
103102 if (!fs::exists (p)) {
104103 throw InternalProgramError (nullptr , PA_CURRENT_FUNCTION, " unzip_all: Attempted to unzip a file that doesn't exist." );
105104 }
@@ -145,7 +144,7 @@ namespace PokemonAutomation{
145144
146145 // Construct your output path (e.g., target_dir + file_stat.m_filename)
147146 std::string out_path = std::string (target_dir) + " /" + file_stat.m_filename ;
148- fs::path const parent_dir{fs::path (out_path).parent_path ()};
147+ Filesystem::Path const parent_dir{Filesystem::Path (out_path).parent_path ()};
149148
150149 // Create the entire directory, including intermediate directories for this file
151150 std::error_code ec{};
0 commit comments