mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
MainWindow: Try fix backup saved for multi scenario.
This commit is contained in:
1 parent
a3da09cf5b
commit
2a1c8c1e57
2 files changed
+4
-16
No files matched your search
+1
-4
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user