Skip to content

Commit

Permalink
Remove non directory from status
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 27, 2023
1 parent 482e815 commit 99c8dd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scan_to_paperless/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 99c8dd7

Please # to comment.