diff --git a/respak2.cpp b/respak2.cpp index ffd5823..d60b384 100644 --- a/respak2.cpp +++ b/respak2.cpp @@ -60,6 +60,7 @@ void printDirectory(string path, int tabs=0) } } + void packDirectory(string path, ofstream& fo, uint32_t& num_files, uint32_t& offset) { for (const auto & entry : fs::directory_iterator(path)) @@ -75,7 +76,7 @@ void packDirectory(string path, ofstream& fo, uint32_t& num_files, uint32_t& off fi.seekg(0); fo << fi.rdbuf(); fi.close(); - toc.push_back({filename, size, offset}); + toc.push_back({filename.substr(filename.find_first_of('/')+1), size, offset}); cout << filename << ":" << size << ":" << offset << endl; num_files++; offset+=size;