diff --git a/PboFileDirectory.cpp b/PboFileDirectory.cpp index 14c2cbd..34c63b0 100644 --- a/PboFileDirectory.cpp +++ b/PboFileDirectory.cpp @@ -203,9 +203,10 @@ void PboFile::ReadFrom(std::filesystem::path inputPath) curFolder = *subfolderFound; continue; } + auto newSub = std::make_shared(); newSub->filename = it; - newSub->fullPath = filePath.parent_path(); + newSub->fullPath = curFolder->fullPath / it; newSub->rootFile = weak_from_this(); curFolder->subfolders.emplace_back(std::move(newSub)); curFolder = curFolder->subfolders.back();