We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
UF_HIDDEN
1 parent 8e30278 commit d74bd20Copy full SHA for d74bd20
src/split_parser.py
@@ -206,14 +206,13 @@ def is_user_file(path: "StrPath"):
206
if os.path.isdir(path) or os.path.basename(path).startswith("."):
207
return False
208
stat_result = os.stat(path)
209
- if stat_result.st_mode & UF_HIDDEN:
210
- return False
211
if sys.platform == "win32":
212
return not (
213
(stat_result.st_file_attributes & FILE_ATTRIBUTE_SYSTEM)
214
| (stat_result.st_file_attributes & FILE_ATTRIBUTE_HIDDEN)
215
)
216
- return True
+ # UF_HIDDEN is present on regular Windows files
+ return not stat_result.st_mode & UF_HIDDEN
217
218
219
def __get_images_from_directory(directory: "StrPath"):
0 commit comments