Skip to content

Commit 32f7f61

Browse files
committed
Fix mask file
1 parent 1030e20 commit 32f7f61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scan_to_paperless/process_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ def _get_default_mask_file(self, default_file_name: str) -> str | None:
9696
if not self.root_folder:
9797
return None
9898
mask_file = self.root_folder / default_file_name
99-
if not mask_file.exists():
99+
if not mask_file.exists() or mask_file.is_dir():
100100
base_folder = self.root_folder.parent
101101
if base_folder is None:
102102
return None
103103
mask_file = base_folder / default_file_name
104-
if not mask_file.exists():
104+
if not mask_file.exists() or mask_file.is_dir():
105105
return None
106106
return str(mask_file)
107107

0 commit comments

Comments
 (0)