unnecessary notification
This commit is contained in:
parent
05f5afc4b8
commit
e7dc0bc0bd
1 changed files with 9 additions and 8 deletions
|
|
@ -493,14 +493,15 @@ class MonitorScreen(Screen):
|
||||||
if conversations_file.exists():
|
if conversations_file.exists():
|
||||||
conversations_file.unlink()
|
conversations_file.unlink()
|
||||||
|
|
||||||
# Delete flow backups only if user chose to
|
# Delete flow backups only if user chose to (and they actually exist)
|
||||||
if delete_backups and flows_backup_path.exists():
|
if self._check_flow_backups():
|
||||||
shutil.rmtree(flows_backup_path)
|
if delete_backups:
|
||||||
# Recreate empty backup directory
|
shutil.rmtree(flows_backup_path)
|
||||||
flows_backup_path.mkdir(parents=True, exist_ok=True)
|
# Recreate empty backup directory
|
||||||
self.notify("Flow backups deleted", severity="information")
|
flows_backup_path.mkdir(parents=True, exist_ok=True)
|
||||||
elif flows_backup_path.exists():
|
self.notify("Flow backups deleted", severity="information")
|
||||||
self.notify("Flow backups preserved in ./flows/backup", severity="information")
|
else:
|
||||||
|
self.notify("Flow backups preserved in ./flows/backup", severity="information")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.notify(
|
self.notify(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue