diff --git a/scripts/watcher.py b/scripts/watcher.py index 97fb188..6e94641 100644 --- a/scripts/watcher.py +++ b/scripts/watcher.py @@ -124,7 +124,7 @@ def resolve_ingest_failure(source: str): def ingest_file(filepath: Path, embedder) -> int: - if filepath.name.startswith(("~$", ".")): + if filepath.name.startswith(("~$", "~", ".")): return 0 if filepath.suffix.lower() not in SUPPORTED: return 0 @@ -197,7 +197,7 @@ def get_changed_files(state: dict) -> list: continue if path.suffix.lower() not in SUPPORTED: continue - if path.name.startswith((".", "~$")): + if path.name.startswith((".", "~$", "~")): continue if "Admin/Backups" in str(path) or "Backups" in path.parts: continue @@ -287,7 +287,7 @@ class IngestHandler(FileSystemEventHandler): self.last_event = 0 def _should_ignore(self, path: Path) -> bool: - if path.name.startswith((".", "~$")): + if path.name.startswith((".", "~$", "~")): return True if "Admin/Backups" in str(path) or "Backups" in path.parts: return True