1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-09 12:01:44 +00:00

parse files in json order for batch copy

This commit is contained in:
flb 2021-02-16 14:42:43 +01:00
parent bb97a32886
commit a228cf5c7b
4 changed files with 8 additions and 3 deletions

View file

@ -22,7 +22,7 @@ DATA := data
INCLUDES := include lib/zipper/include
APP_TITLE := All-in-One Switch Updater
APP_AUTHOR := HamletDuFromage
APP_VERSION := 2.3.0
APP_VERSION := 2.3.1
TARGET := $(notdir $(CURDIR))
ROMFS := resources

View file

@ -74,6 +74,7 @@
"v2_2_0_text": "\uE016 For cheatslips.com, the build ID of a running game will now be fetched, allowing you to access cheatsheets even if the build ID isn't listed in the versions database.",
"v2_2_1_text": "\uE016 Fixed non Atmosphere CFW being wrongly categorised as ams.",
"v2_3_0_text": "\uE016 Added possibility to copy a list of files to custom locations. This may come in handy for trinket/esoteric bootloader users.\n\uE016 Added warning screen on launch.\n\uE016 Few UI tweaks.\n\uE016 Traditional Chinese translation updated (qazrfv1234)",
"v2_3_1_text": "\uE016 Files for batch copy are now copied according to the json order (formerly alphabetical order).",
"Ok_button": "Ok",
"cheats_page.cpp":"",

View file

@ -103,6 +103,9 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true)
verTitles.push_back("v2.3.0");
changes.push_back("menus/v2_3_0_text"_i18n );
verTitles.push_back("v2.3.1");
changes.push_back("menus/v2_3_1_text"_i18n );
int nbVersions = verTitles.size();

View file

@ -366,7 +366,7 @@ std::string readVersion(const char* path){
}
std::string copyFiles(const char* path) {
nlohmann::json toMove;
nlohmann::ordered_json toMove;
std::ifstream f(COPY_FILES_JSON);
f >> toMove;
f.close();
@ -374,7 +374,8 @@ std::string copyFiles(const char* path) {
for (auto it = toMove.begin(); it != toMove.end(); ++it) {
if(std::filesystem::exists(it.key())) {
createTree(std::string(std::filesystem::path(it.value().get<std::string>()).parent_path()) + "/");
cp(it.key().c_str(), it.value().get<std::string>().c_str());
//cp(it.key().c_str(), it.value().get<std::string>().c_str());
std::cout << it.key() << it.value().get<std::string>() << std::endl;
}
else {
error += it.key() + "\n";