From 50f5db1543e9216efe3b80a72a43144d98aa8e82 Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Tue, 29 Mar 2022 22:32:36 -0500 Subject: [PATCH] Update fs to support DirEntry on get_file() --- core/fs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/fs.py b/core/fs.py index bbb133b1..ddb2464d 100644 --- a/core/fs.py +++ b/core/fs.py @@ -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)