Skip to content

Commit d74bd20

Browse files
committed
Don't check the UF_HIDDEN flag on Windows
1 parent 8e30278 commit d74bd20

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/split_parser.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,13 @@ def is_user_file(path: "StrPath"):
206206
if os.path.isdir(path) or os.path.basename(path).startswith("."):
207207
return False
208208
stat_result = os.stat(path)
209-
if stat_result.st_mode & UF_HIDDEN:
210-
return False
211209
if sys.platform == "win32":
212210
return not (
213211
(stat_result.st_file_attributes & FILE_ATTRIBUTE_SYSTEM)
214212
| (stat_result.st_file_attributes & FILE_ATTRIBUTE_HIDDEN)
215213
)
216-
return True
214+
# UF_HIDDEN is present on regular Windows files
215+
return not stat_result.st_mode & UF_HIDDEN
217216

218217

219218
def __get_images_from_directory(directory: "StrPath"):

0 commit comments

Comments
 (0)