SettingsState: Delete old working directory upon recursive move.

This commit is contained in:
J-D-K 2025-09-21 13:54:50 -04:00
parent eaef5a02ad
commit 73d6bc2188

View File

@ -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)