summaryrefslogtreecommitdiff
path: root/utils/nsurl
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nsurl')
-rw-r--r--utils/nsurl/parse.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index 89a10d244..293f8268d 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -270,6 +270,16 @@ static void nsurl__get_string_markers(const char * const url_s,
(*(pos - off + 4) == 'S')))) {
marker.scheme_type = NSURL_SCHEME_HTTPS;
is_http = true;
+ } else if (off == SLEN("file") &&
+ (((*(pos - off + 0) == 'f') ||
+ (*(pos - off + 0) == 'F')) &&
+ ((*(pos - off + 1) == 'i') ||
+ (*(pos - off + 1) == 'I')) &&
+ ((*(pos - off + 2) == 'l') ||
+ (*(pos - off + 2) == 'L')) &&
+ ((*(pos - off + 3) == 'e') ||
+ (*(pos - off + 3) == 'E')))) {
+ marker.scheme_type = NSURL_SCHEME_FILE;
} else if (off == SLEN("ftp") &&
(((*(pos - off + 0) == 'f') ||
(*(pos - off + 0) == 'F')) &&