1717
1818static const std::string GameDirectory = " game" ;
1919static const std::string DLCDirectory = " dlc" ;
20- static const std::string EpisodeSonicDirectory = DLCDirectory + " /Episode Sonic Boss Attack" ;
21- static const std::string EpisodeShadowDirectory = DLCDirectory + " /Episode Shadow Boss Attack" ;
22- static const std::string EpisodeSilverDirectory = DLCDirectory + " /Episode Silver Boss Attack" ;
23- static const std::string EpisodeAmigoDirectory = DLCDirectory + " /Team Attack Amigo" ;
24- static const std::string MissionSonicDirectory = DLCDirectory + " /Mission Pack Sonic Very Hard" ;
25- static const std::string MissionShadowDirectory = DLCDirectory + " /Mission Pack Shadow Very Hard" ;
26- static const std::string MissionSilverDirectory = DLCDirectory + " /Mission Pack Silver Very Hard" ;
20+ static const std::string EpisodeSonicDirectory = DLCDirectory + " /Additional Episode - Sonic Boss Attack" ;
21+ static const std::string EpisodeShadowDirectory = DLCDirectory + " /Additional Episode - Shadow Boss Attack" ;
22+ static const std::string EpisodeSilverDirectory = DLCDirectory + " /Additional Episode - Silver Boss Attack" ;
23+ static const std::string EpisodeAmigoDirectory = DLCDirectory + " /Additional Episode - Team Attack Amigo" ;
24+ static const std::string MissionSonicDirectory = DLCDirectory + " /Additional Mission Pack - Sonic Very Hard" ;
25+ static const std::string MissionShadowDirectory = DLCDirectory + " /Additional Mission Pack - Shadow Very Hard" ;
26+ static const std::string MissionSilverDirectory = DLCDirectory + " /Additional Mission Pack - Silver Very Hard" ;
2727static const std::string GameExecutableFile = " default.xex" ;
2828static const std::string DLCValidationFile = " download.arc" ;
2929static const std::string ISOExtension = " .iso" ;
@@ -70,7 +70,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
7070 if (!std::filesystem::exists (filePath))
7171 {
7272 journal.lastResult = Journal::Result::FileMissing;
73- journal.lastErrorMessage = fmt::format (" File {} does not exist." , fileName);
73+ journal.lastErrorMessage = fmt::format (" File \" {} \" does not exist." , fileName);
7474 return false ;
7575 }
7676
@@ -79,7 +79,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
7979 if (ec)
8080 {
8181 journal.lastResult = Journal::Result::FileReadFailed;
82- journal.lastErrorMessage = fmt::format (" Failed to read file size for {} ." , fileName);
82+ journal.lastErrorMessage = fmt::format (" Failed to read file size for \" {} \" ." , fileName);
8383 return false ;
8484 }
8585
@@ -99,7 +99,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
9999 if (!fileStream.is_open () || fileStream.bad ())
100100 {
101101 journal.lastResult = Journal::Result::FileReadFailed;
102- journal.lastErrorMessage = fmt::format (" Failed to read file {} ." , fileName);
102+ journal.lastErrorMessage = fmt::format (" Failed to read file \" {} \" ." , fileName);
103103 return false ;
104104 }
105105
@@ -113,7 +113,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
113113 if (!fileHashFound)
114114 {
115115 journal.lastResult = Journal::Result::FileHashFailed;
116- journal.lastErrorMessage = fmt::format (" File {} did not match any of the known hashes." , fileName);
116+ journal.lastErrorMessage = fmt::format (" File \" {} \" did not match any of the known hashes." , fileName);
117117 return false ;
118118 }
119119
@@ -136,14 +136,14 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
136136 if (!sourceVfs.exists (filename))
137137 {
138138 journal.lastResult = Journal::Result::FileMissing;
139- journal.lastErrorMessage = fmt::format (" File {} does not exist in {} ." , filename, sourceVfs.getName ());
139+ journal.lastErrorMessage = fmt::format (" File \" {} \" does not exist in \" {} \" ." , filename, sourceVfs.getName ());
140140 return false ;
141141 }
142142
143143 if (!sourceVfs.load (filename, fileData))
144144 {
145145 journal.lastResult = Journal::Result::FileReadFailed;
146- journal.lastErrorMessage = fmt::format (" Failed to read file {} from {} ." , filename, sourceVfs.getName ());
146+ journal.lastErrorMessage = fmt::format (" Failed to read file \" {} \" from \" {} \" ." , filename, sourceVfs.getName ());
147147 return false ;
148148 }
149149
@@ -159,7 +159,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
159159 if (!fileHashFound)
160160 {
161161 journal.lastResult = Journal::Result::FileHashFailed;
162- journal.lastErrorMessage = fmt::format (" File {} from {} did not match any of the known hashes." , filename, sourceVfs.getName ());
162+ journal.lastErrorMessage = fmt::format (" File \" {} \" from \" {} \" did not match any of the known hashes." , filename, sourceVfs.getName ());
163163 return false ;
164164 }
165165 }
@@ -187,7 +187,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
187187 if (!outStream.is_open ())
188188 {
189189 journal.lastResult = Journal::Result::FileCreationFailed;
190- journal.lastErrorMessage = fmt::format (" Failed to create file at {} ." , fromPath (targetPath));
190+ journal.lastErrorMessage = fmt::format (" Failed to create file at \" {} \" ." , fromPath (targetPath));
191191 return false ;
192192 }
193193
@@ -197,7 +197,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
197197 if (outStream.bad ())
198198 {
199199 journal.lastResult = Journal::Result::FileWriteFailed;
200- journal.lastErrorMessage = fmt::format (" Failed to create file at {} ." , fromPath (targetPath));
200+ journal.lastErrorMessage = fmt::format (" Failed to create file at \" {} \" ." , fromPath (targetPath));
201201 return false ;
202202 }
203203
@@ -253,7 +253,7 @@ static DLC detectDLC(const std::filesystem::path &sourcePath, VirtualFileSystem
253253 }
254254
255255 journal.lastResult = Journal::Result::UnknownDLCType;
256- journal.lastErrorMessage = fmt::format (" DLC type for {} is unknown." , name);
256+ journal.lastErrorMessage = fmt::format (" DLC type for \" {} \" is unknown." , name);
257257 return DLC ::Unknown;
258258}
259259
@@ -384,7 +384,7 @@ bool Installer::computeTotalSize(std::span<const FilePair> filePairs, const uint
384384 if (!sourceVfs.exists (filename))
385385 {
386386 journal.lastResult = Journal::Result::FileMissing;
387- journal.lastErrorMessage = fmt::format (" File {} does not exist in {} ." , filename, sourceVfs.getName ());
387+ journal.lastErrorMessage = fmt::format (" File \" {} \" does not exist in \" {} \" ." , filename, sourceVfs.getName ());
388388 return false ;
389389 }
390390
@@ -421,7 +421,7 @@ bool Installer::copyFiles(std::span<const FilePair> filePairs, const uint64_t *f
421421 if (!std::filesystem::exists (targetDirectory) && !std::filesystem::create_directories (targetDirectory, ec))
422422 {
423423 journal.lastResult = Journal::Result::DirectoryCreationFailed;
424- journal.lastErrorMessage = " Unable to create directory at " + fromPath (targetDirectory);
424+ journal.lastErrorMessage = " Unable to create directory at \" " + fromPath (targetDirectory) + " \" . " ;
425425 return false ;
426426 }
427427
@@ -452,7 +452,7 @@ bool Installer::parseContent(const std::filesystem::path &sourcePath, std::uniqu
452452 else
453453 {
454454 journal.lastResult = Journal::Result::VirtualFileSystemFailed;
455- journal.lastErrorMessage = " Unable to open " + fromPath (sourcePath);
455+ journal.lastErrorMessage = " Unable to open \" " + fromPath (sourcePath) + " \" . " ;
456456 return false ;
457457 }
458458}
0 commit comments