mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-07-13 22:50:55 -05:00
SettingsState: Delete old working directory upon recursive move.
This commit is contained in:
parent
eaef5a02ad
commit
73d6bc2188
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user