From 26768833112181b4c9e353237224c2c9f7df850e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 2 Nov 2021 08:56:02 -0400 Subject: [PATCH] Reset autosave dir if template patch cannot be loaded. --- src/patch.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/patch.cpp b/src/patch.cpp index e2861c53..a7344070 100644 --- a/src/patch.cpp +++ b/src/patch.cpp @@ -279,6 +279,9 @@ void Manager::loadTemplate() { catch (Exception& e) { std::string message = string::f("Could not load system template patch, clearing rack: %s", e.what()); osdialog_message(OSDIALOG_INFO, OSDIALOG_OK, message.c_str()); + + system::removeRecursively(autosavePath); + system::createDirectories(autosavePath); clear(); } }