MainWindow: Try fix backup saved for multi scenario.

This commit is contained in:
parouby committed 2025-09-04 14:53:20 +02:00
1 parent a3da09cf5b
commit 2a1c8c1e57
2 files changed
+4 -16

No files matched your search

+1 -4
View File
@@ -126,15 +126,12 @@ class Study(SQLModel):
is_new = False
fname = fname + "." + str(self._old_save_id)
if os.path.exists(self.filename) and ".backup" not in self.filename:
if os.path.exists(self.filename):
filename = os.path.join(fdir, "_PAMHYR_", "__old__", fname)
logger.debug(f"Backup previous version copy: {filename}")
shutil.copy(self.filename, filename)
self._old_save_id += 1
if ".backup" in self.filename:
is_new = True
if not os.path.exists(self.filename):
is_new = True