1
0
réplica de https://github.com/arsenetar/dupeguru.git sincronizado 2025-09-11 17:58:17 +00:00

Update fs to support DirEntry on get_file()

Este cometimento está contido em:
Andrew Senetar 2022-03-29 22:32:36 -05:00
ascendente a5b0ccdd02
cometimento 50f5db1543
Assinados por: arsenetar
ID da chave GPG: C63300DCE48AB2F1

Ver ficheiro

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