diff --git a/scan_to_paperless/status.py b/scan_to_paperless/status.py index 43a897ba..45a42e60 100644 --- a/scan_to_paperless/status.py +++ b/scan_to_paperless/status.py @@ -82,7 +82,10 @@ def scan(self) -> None: for name in self._status: if name != self._current_folder: - self._update_status(name) + if os.path.isdir(os.path.join(os.environ.get("SCAN_SOURCE_FOLDER", "/source"), name)): + self._update_status(name) + else: + del self._status[name] names = [] for config_file_name in glob.glob(