summaryrefslogtreecommitdiff
path: root/src/gmutil.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-04 21:16:19 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-04 21:16:41 +0200
commit9a4032bbba8846d1f5c92b4c39743dc6884f06ec (patch)
treecf43e133677d6d1ea40e87d24e80c3ffbe0062e1 /src/gmutil.c
parentabec43cd54a14c6d4a74239df97870a83cc474ed (diff)
Windows: Dealing with "file:///" URIs
Diffstat (limited to 'src/gmutil.c')
-rw-r--r--src/gmutil.c5
1 files changed, 4 insertions, 1 deletions
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
192iString *makeFileUrl_String(const iString *localFilePath) { 192iString *makeFileUrl_String(const iString *localFilePath) {
193 iString *url = cleaned_Path(localFilePath); 193 iString *url = cleaned_Path(localFilePath);
194 replace_Block(&url->chars, '\\', '/'); /* in case it's a Windows path */ 194 replace_Block(&url->chars, '\\', '/'); /* in case it's a Windows path */
195 set_String(url, collect_String(urlEncodeExclude_String(url, "/"))); 195 set_String(url, collect_String(urlEncodeExclude_String(url, "/:")));
196#if defined (iPlatformMsys)
197 prependChar_String(url, '/'); /* three slashes */
198#endif
196 prependCStr_String(url, "file://"); 199 prependCStr_String(url, "file://");
197 return url; 200 return url;
198} 201}