File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -364,10 +364,10 @@ bool unpackFiles(std::string sDest) {
364
364
if ((int )(it->type ) == 1 ) {
365
365
std::string name = (const char *)(it->name );
366
366
std::string sDestFilePath = sDest + name;
367
- size_t pos = name.find_last_of (" /" );
367
+ size_t pos = name.find_first_of (" /" , 1 );
368
368
369
- // If file is in sub directory ?
370
- if (pos != std::string::npos) {
369
+ // If file is in sub directories ?
370
+ while (pos != std::string::npos) {
371
371
// Subdir path.
372
372
std::string path = sDest ;
373
373
path += name.substr (0 , pos);
@@ -378,6 +378,8 @@ bool unpackFiles(std::string sDest) {
378
378
return false ;
379
379
}
380
380
}
381
+
382
+ pos = name.find_first_of (" /" , pos + 1 );
381
383
}
382
384
383
385
// Unpack file to destination directory.
You can’t perform that action at this time.
0 commit comments