do not overwrite old backup until new backup is done
This commit is contained in:
1 parent
5ea1ed6d0a
commit
070509c691
2 files changed
+12
-4
No files matched your search
@@ -1095,7 +1095,10 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
|
||||
def _autosave(self):
|
||||
# TODO better separate thread may it takes some time to save
|
||||
self.status.setText('Autosave...')
|
||||
NMRWriter(self.management.graphs, self.management.data).export(self.__backup_path)
|
||||
success = NMRWriter(self.management.graphs, self.management.data).export(self.__backup_path.with_suffix('.nmr.0'))
|
||||
if success:
|
||||
self.__backup_path.with_suffix('.nmr.0').rename(self.__backup_path)
|
||||
|
||||
self.status.setText('')
|
||||
|
||||
def check_for_backup(self):
|
||||
|
||||
Reference in new issue
Block a user