diff --git a/programs/nstool/source/PfsProcess.cpp b/programs/nstool/source/PfsProcess.cpp index 10656d7..8577e8f 100644 --- a/programs/nstool/source/PfsProcess.cpp +++ b/programs/nstool/source/PfsProcess.cpp @@ -73,9 +73,13 @@ void PfsProcess::extractFs() fnd::SimpleFile outFile; const fnd::List& file = mPfs.getFileList(); + std::string file_path; for (size_t i = 0; i < file.getSize(); i++) { - outFile.open(mExtractPath + kPathSeparator + file[i].name, outFile.Create); + file_path.clear(); + fnd::io::appendToPath(file_path, mExtractPath); + fnd::io::appendToPath(file_path, file[i].name); + outFile.open(file_path, outFile.Create); mReader->seek(mOffset + file[i].offset); for (size_t j = 0; j < (file[i].size / kFileExportBlockSize); j++) { diff --git a/programs/nstool/source/nstool.h b/programs/nstool/source/nstool.h index a411172..54d12ce 100644 --- a/programs/nstool/source/nstool.h +++ b/programs/nstool/source/nstool.h @@ -9,11 +9,6 @@ static const size_t kMasterKeyNum = 0x20; static const size_t kNcaKeakNum = nx::nca::kKeyAreaEncryptionKeyNum; -#ifdef _WIN32 -const std::string kPathSeparator = "\\"; -#else -const std::string kPathSeparator = "/"; -#endif enum FileType {