From a4ed20295f87de040e3afd4bc47777ccb6f47a75 Mon Sep 17 00:00:00 2001 From: AL <26797547+Al12rs@users.noreply.github.com> Date: Mon, 30 Mar 2020 22:10:15 +0200 Subject: Fix "Failed to setup data paths" loop by showing the choose instance dialog for next startup. This could sometimes happen if users changed a drive letter or removed a drive with one of the Mo2 paths on it making Mo2 error on startup. Only fix was to manually edit the modorganizer.ini file or manually deleting the instance. This allows users to create or use other instances even if that particular instance still needs manual fixing. --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 10887825..ceaa59f2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -527,6 +527,7 @@ int runApplication(MOApplication &application, SingleInstance &instance, if (!bootstrap()) { reportError("failed to set up data paths"); + InstanceManager::instance().clearCurrentInstance(); return 1; } @@ -561,6 +562,7 @@ int runApplication(MOApplication &application, SingleInstance &instance, OrganizerCore organizer(settings); if (!organizer.bootstrap()) { reportError("failed to set up data paths"); + InstanceManager::instance().clearCurrentInstance(); return 1; } @@ -951,6 +953,7 @@ int main(int argc, char *argv[]) if (!createAndMakeWritable(AppConfig::logPath())) { reportError("Failed to create log folder"); + InstanceManager::instance().clearCurrentInstance(); return 1; } -- cgit v1.3.1