diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-25 13:34:22 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-25 13:34:22 (GMT) |
commit | f4a9ac25e9cf27914ad4235d0745980d56212c1d (patch) | |
tree | 69d570dda53bf0dce9649b22cfd0bc0a6686fa4a /Lib | |
parent | c28fc37ed1b3845e757b4388e5a775fb61430f87 (diff) | |
download | cpython-f4a9ac25e9cf27914ad4235d0745980d56212c1d.zip cpython-f4a9ac25e9cf27914ad4235d0745980d56212c1d.tar.gz cpython-f4a9ac25e9cf27914ad4235d0745980d56212c1d.tar.bz2 |
Workaround for bug #644243 (which is actually an Apple bug, I think): URLs
of the form file:/path/to/file don't work whereas file:///path/to/file
works fine. We convert the former to the latter.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/plat-mac/ic.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/plat-mac/ic.py b/Lib/plat-mac/ic.py index 91e14f3..33091ff 100644 --- a/Lib/plat-mac/ic.py +++ b/Lib/plat-mac/ic.py @@ -195,6 +195,10 @@ class IC: self.ic.ICSetPref(key, ICattr_no_change, value) def launchurl(self, url, hint=""): + # Work around a bug in ICLaunchURL: file:/foo does + # not work but file:///foo does. + if url[:6] == 'file:/' and url[6] != '/': + url = 'file:///' + url[6:] self.ic.ICLaunchURL(hint, url, 0, len(url)) def parseurl(self, data, start=None, end=None, hint=""): |