Gui: Improve version migration UX

This commit is contained in:
Chris Hennes
2025-09-02 18:59:46 -05:00
parent 6282b7c08d
commit d9e6ee8fa1
6 changed files with 397 additions and 145 deletions

View File

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