Skip to content

Commit

Permalink
Give the local zip/namespace/file readers precedence over the native …
Browse files Browse the repository at this point in the history
…reader.
  • Loading branch information
jaraco committed Feb 17, 2023
1 parent 68be8b4 commit 8da2027
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion importlib_resources/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ def _file_reader(spec):
or
# local FileReader
_file_reader(self.spec)
or
# native reader if it supplies 'files'
_native_reader(self.spec)
or
# fallback - adapt the spec ResourceReader to TraversableReader
or _adapters.CompatibilityFiles(self.spec)
_adapters.CompatibilityFiles(self.spec)
)


Expand Down

0 comments on commit 8da2027

Please sign in to comment.