mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-08-28 05:24:31 -05:00
SettingsState: Delete old working directory upon recursive move.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user