From edf4640c70e68ff120ccb173b09d33f968cb1801 Mon Sep 17 00:00:00 2001 From: Ashton <38200084+Alphalaneous@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:51:53 -0400 Subject: [PATCH] Fix $ path --- src/UIModding.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/UIModding.cpp b/src/UIModding.cpp index 69dc1b9..ebece90 100644 --- a/src/UIModding.cpp +++ b/src/UIModding.cpp @@ -1463,8 +1463,9 @@ void UIModding::handleModifications(CCNode* node, matjson::Object nodeObject) { void UIModding::doUICheck(CCNode* node) { - std::string path = "ui/" + node->getID() + ".json"; - + std::string path = "ui/" + node->getID() + ".json" + std::replace(path.begin(), path.end(), '/', '$'); + unsigned long fileSize = 0; unsigned char* buffer = CCFileUtils::sharedFileUtils()->getFileData(path.c_str(), "rb", &fileSize); @@ -1515,7 +1516,6 @@ void UIModding::startFileListeners() { for (std::string path : packs) { std::string uiPath = fmt::format("{}{}", path, "ui\\"); - std::replace(uiPath.begin(), uiPath.end(), '$', '/'); FileWatcher* fw = new FileWatcher(uiPath, std::chrono::milliseconds(500)); listeners.push_back(fw); @@ -1598,4 +1598,4 @@ void UIModding::doUICheckForType(std::string type, CCNode* node) { matjson::Object object = value.as_object(); handleModifications(node, object); } -} \ No newline at end of file +}