From e4e72098f83f22a5a0dc98bf76b8c2196107c740 Mon Sep 17 00:00:00 2001 From: user95401 Date: Sat, 30 Mar 2024 21:20:27 +0400 Subject: [PATCH] fix things --- _Src/_ui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_Src/_ui.cpp b/_Src/_ui.cpp index e7ffea0..9bcf541 100644 --- a/_Src/_ui.cpp +++ b/_Src/_ui.cpp @@ -480,12 +480,13 @@ class $modify(LevelPageExt, LevelPage) { //level data for (size_t levelID = 0; levelID < 127; levelID++) { if (levelID > g_currentPage) { + auto filepath = CCFileUtils::sharedFileUtils()->fullPathForFilename(fmt::format("levels/{}.txt", levelID).data(), 0); if ( !std::filesystem::exists(FilePathFromModFolder(fmt::format("levels/{}.txt", levelID))) - and std::filesystem::exists(fmt::format("Resources/levels/{}.txt", levelID)) + and std::filesystem::exists(filepath.data()) ) std::filesystem::copy_file( - fmt::format("Resources/levels/{}.txt", levelID).c_str(), + filepath.data(), FilePathFromModFolder(fmt::format("levels/{}.txt", levelID - 1)).c_str() ); else