Lagrange [work/v1.6]

Windows: Fixed path handling issues during font loading

=> c1845e9828de4bbc33e602c577b02f42d5460b28

diff --git a/lib/the_Foundation b/lib/the_Foundation
index adf8b403..6c7d2a3b 160000
--- a/lib/the_Foundation
+++ b/lib/the_Foundation
@@ -1 +1 @@
-Subproject commit adf8b403f3acecc159511c22a79b10e65453c088
+Subproject commit 6c7d2a3b050aae3b37adc626aa75f040b5acb930
diff --git a/src/fontpack.c b/src/fontpack.c
index ec62702f..40e4c96c 100644
--- a/src/fontpack.c
+++ b/src/fontpack.c
@@ -389,6 +389,7 @@ void handleIniKeyValue_FontPack_(void *context, const iString *table, const iStr
                     }
                 }
                 iString *fontFileId = concat_Path(d->loadPath, cleanPath);
+                iAssert(!isEmpty_String(fontFileId));
                 /* FontFiles share source data blocks. The entire FontFiles can be reused, too, 
                    if have the same collection index is in use. */
                 iBlock *data = NULL;
@@ -466,6 +467,7 @@ iBool loadArchive_FontPack(iFontPack *d, const iArchive *zip) {
 }
 
 void setLoadPath_FontPack(iFontPack *d, const iString *path) {
+    /* Note: `path` is for the local file system. */
     if (!d->loadPath) {
         d->loadPath = new_String();
     }
@@ -480,7 +482,8 @@ const iString *idFromUrl_FontPack(const iString *url) {
     iString *id = new_String();
     iUrl parts;
     init_Url(&parts, url);
-    setRange_String(id, baseName_Path(collectNewRange_String(parts.path)));
+    /* URLs always use slash as separator. */
+    setRange_String(id, baseNameSep_Path(collectNewRange_String(parts.path), "/"));
     setRange_String(id, withoutExtension_Path(id));
     replace_String(id, " ", "-");
     return collect_String(id);
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.6/cdiff/c1845e9828de4bbc33e602c577b02f42d5460b28
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
44.199842 milliseconds
Gemini-to-HTML Time
0.262934 milliseconds

This content has been proxied by September (ba2dc).