Skip to content

Commit

Permalink
Merge pull request #2116 from midichef/http_open_recursion
Browse files Browse the repository at this point in the history
[zip] fix recursion error fetching remote zipfile
  • Loading branch information
anjakefala authored Nov 17, 2023
2 parents f029012 + ceec18e commit 9660fb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visidata/loaders/unzip_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def matching_files(self, *globs):
if any(fnmatch.fnmatch(f.filename, g) for g in globs):
yield f

def open(self, fn):
def _open(self, fn):
if isinstance(fn, str):
f = list(self.matching_files(fn))
if not f:
Expand All @@ -228,7 +228,7 @@ def open(self, fn):
error(f'unknown compression method {method}')

def open(self, fn):
return io.TextIOWrapper(self.open(fn))
return io.TextIOWrapper(self._open(fn))


class RemoteZipStream(io.RawIOBase):
Expand Down

0 comments on commit 9660fb4

Please # to comment.