]> git.ozlabs.org Git - petitboot/blobdiff - ui/common/url.c
ui/common: Remove unused artwork
[petitboot] / ui / common / url.c
index 3e6c8dacc19816df8b45ce158bac948a0d214fc0..4e4b9610cd96f1016a6d38aca78e258f5a97452c 100644 (file)
@@ -170,6 +170,11 @@ struct pb_url *pb_url_parse(void *ctx, const char *url_str)
                        url->port = NULL;
                        url->host = talloc_strndup(url, p, path - p);
                }
+
+               /* remove multiple leading slashes */
+               for (; *path && *(path+1) == '/'; path++)
+                       ;
+
                url->path = talloc_strdup(url, path);
        }