File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -203,14 +203,17 @@ def is_user_file(path: "StrPath"):
203
203
"""Returns False for hidden files, system files and folders."""
204
204
if os .path .isdir (path ) or os .path .basename (path ).startswith ("." ):
205
205
return False
206
+ if sys .platform == "linux" :
207
+ return True
206
208
stat_result = os .stat (path )
207
209
if sys .platform == "win32" :
208
210
return not (
209
211
(stat_result .st_file_attributes & FILE_ATTRIBUTE_SYSTEM )
210
212
| (stat_result .st_file_attributes & FILE_ATTRIBUTE_HIDDEN )
211
213
)
212
- # UF_HIDDEN is present on regular Windows files
213
- return not stat_result .st_mode & UF_HIDDEN
214
+ if sys .platform == "darwin" :
215
+ return not (stat_result .st_mode & UF_HIDDEN )
216
+ return True
214
217
215
218
216
219
def __get_images_from_directory (directory : "StrPath" ):
You can’t perform that action at this time.
0 commit comments