Gui: Improve version migration UX
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#include <Python.h>
|
||||
#include <QString>
|
||||
|
||||
#include "Base/Console.h"
|
||||
|
||||
|
||||
using namespace App;
|
||||
namespace fs = std::filesystem;
|
||||
@@ -567,6 +569,7 @@ void ApplicationDirectories::migrateAllPaths(const std::vector<fs::path> &paths)
|
||||
} else {
|
||||
newPath = path / versionStringForPath(major, minor);
|
||||
}
|
||||
Base::Console().message("Migrating config from %s to %s\n", Base::FileInfo::pathToString(path), Base::FileInfo::pathToString(newPath));
|
||||
if (fs::exists(newPath)) {
|
||||
throw Base::RuntimeError("Cannot migrate config - path already exists: " + Base::FileInfo::pathToString(newPath));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user