Skip to content

Commit 72cd491

Browse files
committed
Return base address (unsigned)
1 parent 736781d commit 72cd491

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

bioformats/formatreader.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,12 @@ def __init__(self, path=None, url=None, perform_init=True):
674674
self.init_reader()
675675

676676
def download(self, url):
677-
scheme = urlparse(url).scheme
677+
scheme = urlparse(url)[0]
678678
ext = url[url.rfind("."):]
679+
urlpath = urlparse(url)[2]
680+
filename = unquote(urlpath.split("/")[-1])
681+
682+
self.using_temp_file = True
679683

680684
if scheme == 's3':
681685
client = boto3.client('s3')
@@ -695,9 +699,7 @@ def download(self, url):
695699
os.remove(self.path)
696700
finally:
697701
src.close()
698-
self.using_temp_file = True
699-
urlpath = urlparse(url)[2]
700-
filename = unquote(urlpath.split("/")[-1])
702+
701703
return filename
702704

703705
def __enter__(self):

0 commit comments

Comments
 (0)