Merge pull request #17607 from RandomShaper/fix-bogus-file-in-pack

Fix listing files inside directory in pack file
This commit is contained in:
Rémi Verschelde 2018-03-20 12:50:19 +01:00 committed by GitHub
commit b49ca9486c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,11 @@ void PackedData::add_path(const String &pkg_path, const String &path, uint64_t o
}
}
}
cd->files.insert(path.get_file());
String filename = path.get_file();
// Don't add as a file if the path points to a directoryy
if (!filename.empty()) {
cd->files.insert(filename);
}
}
}