Skip to content

Commit

Permalink
Move results to make code a bit easier to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
johandahlberg committed Aug 21, 2024
1 parent 3e2b3fe commit 92f3aa4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fsspec/implementations/zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ def _below_max_recursion_depth(path):
depth = len(path.split("/"))
return depth > maxdepth

result = {}

# Remove the leading slash, as the zip file paths are always
# given without a leading slash
path = path.lstrip("/")
Expand All @@ -160,6 +158,7 @@ def _matching_starts(file_path):

self._get_dirs()

result = {}
# To match posix find, if an exact file name is given, we should
# return only that file
if path in self.dir_cache and self.dir_cache[path]["type"] == "file":
Expand Down

0 comments on commit 92f3aa4

Please sign in to comment.