summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gmutil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c
index 79268dd4..39a1aef3 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -161,7 +161,7 @@ const iString *absoluteUrl_String(const iString *d, const iString *urlMaybeRelat
161 if (isDef_(rel.scheme) || isDef_(rel.host) || isAbsolutePath_(rel.path)) { 161 if (isDef_(rel.scheme) || isDef_(rel.host) || isAbsolutePath_(rel.path)) {
162 appendRange_String(absolute, isDef_(rel.path) ? rel.path : range_CStr("/")); /* absolute path */ 162 appendRange_String(absolute, isDef_(rel.path) ? rel.path : range_CStr("/")); /* absolute path */
163 } 163 }
164 else { 164 else if (isDef_(rel.path)) {
165 if (!endsWith_Rangecc(orig.path, "/")) { 165 if (!endsWith_Rangecc(orig.path, "/")) {
166 /* Referencing a file. */ 166 /* Referencing a file. */
167 appendRange_String(absolute, dirPath_(orig.path)); 167 appendRange_String(absolute, dirPath_(orig.path));
@@ -175,6 +175,10 @@ const iString *absoluteUrl_String(const iString *d, const iString *urlMaybeRelat
175 } 175 }
176 appendRange_String(absolute, rel.path); 176 appendRange_String(absolute, rel.path);
177 } 177 }
178 else if (isDef_(rel.query)) {
179 /* Just a new query. */
180 appendRange_String(absolute, orig.path);
181 }
178 appendRange_String(absolute, rel.query); 182 appendRange_String(absolute, rel.query);
179 cleanUrlPath_String(absolute); 183 cleanUrlPath_String(absolute);
180 return absolute; 184 return absolute;