From 73d6bc21883e00a75ae569835bb27e8d842ddc7b Mon Sep 17 00:00:00 2001 From: J-D-K Date: Sun, 21 Sep 2025 13:54:50 -0400 Subject: [PATCH] SettingsState: Delete old working directory upon recursive move. --- source/appstates/SettingsState.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/appstates/SettingsState.cpp b/source/appstates/SettingsState.cpp index a0e7001..78eda86 100644 --- a/source/appstates/SettingsState.cpp +++ b/source/appstates/SettingsState.cpp @@ -173,7 +173,11 @@ void SettingsState::change_working_directory() const bool exists = fslib::directory_exists(newPath); bool moved{}; - if (exists) { moved = fs::move_directory_recursively(oldPath, newPath); } + if (exists) + { + moved = fs::move_directory_recursively(oldPath, newPath); + error::fslib(fslib::delete_directory_recursively(oldPath)) + } else { moved = fslib::rename_directory(oldPath, newPath); } if (!moved)