diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp index 42717e55..dca9034d 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp @@ -80,17 +80,9 @@ plRegistryPageNode::plRegistryPageNode(const plLocation& location, const plStrin { fPageInfo.SetStrings(age, page); - plString path = dataPath; - path += PATH_SEPARATOR_STR; - // Time to construct our actual file name. For now, we'll use the same old format // of age_page.extension - path += fPageInfo.GetAge(); - path += "_District_"; - path += fPageInfo.GetPage(); - path += ".prp"; - - fPath = path; + fPath = plString::Format("%s%x%s_District_%s.prp", dataPath.c_str(), PATH_SEPARATOR_STR, fPageInfo.GetAge().c_str(), fPageInfo.GetPage().c_str()); } plRegistryPageNode::~plRegistryPageNode() @@ -137,7 +129,7 @@ hsStream* plRegistryPageNode::OpenStream() { if (fOpenRequests == 0) { - if (!fStream.Open(fPath.c_str(), "rb")) + if (!fStream.Open_TEMP(fPath, "rb")) return nil; } fOpenRequests++; diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp index 37552374..eda1d7ae 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp @@ -1770,7 +1770,7 @@ bool plResManager::IteratePages(plRegistryPageIterator* iterator, const plString if (page->GetPageInfo().GetLocation() == plLocation::kGlobalFixedLoc) continue; - if (!ageToRestrictTo.IsNull() || page->GetPageInfo().GetAge().CompareI(ageToRestrictTo) == 0) + if (ageToRestrictTo.IsNull() || page->GetPageInfo().GetAge().CompareI(ageToRestrictTo) == 0) { if (!iterator->EatPage(page)) { diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h index 8209b777..306ed0c1 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h +++ b/Sources/Plasma/PubUtilLib/plResMgr/plResManager.h @@ -155,7 +155,7 @@ public: // Single page version bool IterateKeys(plRegistryKeyIterator* iterator, const plLocation& pageToRestrictTo); // Iterate through loaded pages - bool IteratePages(plRegistryPageIterator* iterator, const plString& ageToRestrictTo = nil); + bool IteratePages(plRegistryPageIterator* iterator, const plString& ageToRestrictTo = ""); // Iterate through ALL pages, loaded or not bool IterateAllPages(plRegistryPageIterator* iterator);