[nstool] Removed duplicated definition of the platform path dividers.

This commit is contained in:
jakcron 2018-04-25 23:21:05 +08:00
parent c64e9e2f42
commit 10655e828e
2 changed files with 5 additions and 6 deletions

View file

@ -73,9 +73,13 @@ void PfsProcess::extractFs()
fnd::SimpleFile outFile; fnd::SimpleFile outFile;
const fnd::List<nx::PfsHeader::sFile>& file = mPfs.getFileList(); const fnd::List<nx::PfsHeader::sFile>& file = mPfs.getFileList();
std::string file_path;
for (size_t i = 0; i < file.getSize(); i++) 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); mReader->seek(mOffset + file[i].offset);
for (size_t j = 0; j < (file[i].size / kFileExportBlockSize); j++) for (size_t j = 0; j < (file[i].size / kFileExportBlockSize); j++)
{ {

View file

@ -9,11 +9,6 @@
static const size_t kMasterKeyNum = 0x20; static const size_t kMasterKeyNum = 0x20;
static const size_t kNcaKeakNum = nx::nca::kKeyAreaEncryptionKeyNum; static const size_t kNcaKeakNum = nx::nca::kKeyAreaEncryptionKeyNum;
#ifdef _WIN32
const std::string kPathSeparator = "\\";
#else
const std::string kPathSeparator = "/";
#endif
enum FileType enum FileType
{ {