Bug fix - Delete watch from UI when watch is manually deleted from datadir

bugfix-delete-missing-dir
dgtlmoon 1 year ago
parent e62eeb1c4a
commit 5b236ba6ad

@ -204,11 +204,12 @@ class ChangeDetectionStore:
# GitHub #30 also delete history records
for uuid in self.data['watching']:
path = pathlib.Path(os.path.join(self.datastore_path, uuid))
if os.path.exists(path):
shutil.rmtree(path)
self.needs_write_urgent = True
else:
path = pathlib.Path(os.path.join(self.datastore_path, uuid))
if os.path.exists(path):
shutil.rmtree(path)
del self.data['watching'][uuid]

Loading…
Cancel
Save