From 1b38216663e971c053da1f461737fb28c92d6372 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Thu, 10 Oct 2024 20:10:33 +0200 Subject: [PATCH] Arreglada la ruta dels arxius en el pack --- respak2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;