From: Guido van Rossum Date: Wed, 20 Aug 1997 23:34:01 +0000 (+0000) Subject: Interpret three slashes in file: URL as local file (for Netscape on X-Git-Tag: v1.5a4~353 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6784dc53f41def6dcf59585038cd720c2f66969;p=python Interpret three slashes in file: URL as local file (for Netscape on Windows/Mac). --- diff --git a/Lib/urllib.py b/Lib/urllib.py index d9040cc99e..337015fed0 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -281,10 +281,10 @@ class URLopener: # Use local file or FTP depending on form of URL def open_file(self, url): - if url[:2] == '//': - return self.open_ftp(url) - else: - return self.open_local_file(url) + if url[:2] == '//' and url[2:3] != '/': + return self.open_ftp(url) + else: + return self.open_local_file(url) # Use local file def open_local_file(self, url):