From 9a4032bbba8846d1f5c92b4c39743dc6884f06ec Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 4 Dec 2020 21:16:19 +0200 Subject: Windows: Dealing with "file:///" URIs --- src/gmutil.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gmutil.c') diff --git a/src/gmutil.c b/src/gmutil.c index 557a82f8..94f00ce1 100644 --- a/src/gmutil.c +++ b/src/gmutil.c @@ -192,7 +192,10 @@ const iString *absoluteUrl_String(const iString *d, const iString *urlMaybeRelat iString *makeFileUrl_String(const iString *localFilePath) { iString *url = cleaned_Path(localFilePath); replace_Block(&url->chars, '\\', '/'); /* in case it's a Windows path */ - set_String(url, collect_String(urlEncodeExclude_String(url, "/"))); + set_String(url, collect_String(urlEncodeExclude_String(url, "/:"))); +#if defined (iPlatformMsys) + prependChar_String(url, '/'); /* three slashes */ +#endif prependCStr_String(url, "file://"); return url; } -- cgit v1.2.3