summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/ic.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/plat-mac/ic.py')
-rw-r--r--Lib/plat-mac/ic.py4
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=""):