Skip to content

Commit 705ec16

Browse files
vpkpp: fix option to use buggy VPK extension handling (intentional)
1 parent 7bd7745 commit 705ec16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vpkpp/format/VPK.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,15 +513,15 @@ bool VPK::bake(const std::string& outputDir_, BakeOptions options, const EntryCa
513513

514514
// Reconstruct data so we're not looping over it a ton of times
515515
std::unordered_map<std::string, std::unordered_map<std::string, std::vector<std::pair<std::string, Entry*>>>> temp;
516-
this->runForAllEntriesInternal([&options, &temp](const std::string& path, Entry& entry) {
516+
this->runForAllEntriesInternal([this, &options, &temp](std::string path, Entry& entry) {
517517
auto fsPath = std::filesystem::path{path};
518518
if (options.vpk_useBuggyExtensionHandling && fsPath.has_extension()) {
519-
std::string ext;
519+
const auto ext = fsPath.extension().string();
520520
while (!fsPath.extension().string().empty()) {
521-
ext = fsPath.extension().string();
522521
fsPath.replace_extension();
523522
}
524523
fsPath.replace_extension(ext);
524+
path = this->cleanEntryPath(fsPath.string());
525525
}
526526

527527
auto extension = fsPath.extension().string();

0 commit comments

Comments
 (0)