Update fs to support DirEntry on get_file()

This commit is contained in:
Andrew Senetar 2022-03-29 22:32:36 -05:00
parent a5b0ccdd02
commit 50f5db1543
Signed by: arsenetar
GPG Key ID: C63300DCE48AB2F1
1 changed files with 2 additions and 0 deletions

View File

@ -396,6 +396,8 @@ def get_file(path, fileclasses=[File]):
"""
for fileclass in fileclasses:
if fileclass.can_handle(path):
if type(path) is os.DirEntry:
return fileclass(path.path)
return fileclass(path)