diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 12:48:15 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 12:48:15 +0100 |
commit | e2a714acb09db7f61505c7b22858cc58154ed0e3 (patch) | |
tree | 0de1b582f3de18b7f3803a2f525ebfd87a08e085 /cocoa | |
parent | 045905b93ea9205363c522a9c1aca77971501b50 (diff) | |
download | netsurf-e2a714acb09db7f61505c7b22858cc58154ed0e3.tar.gz |
Fix warnings.
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/BrowserViewController.m | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cocoa/BrowserViewController.m b/cocoa/BrowserViewController.m index d94b2ab77..76518a2d4 100644 --- a/cocoa/BrowserViewController.m +++ b/cocoa/BrowserViewController.m @@ -26,6 +26,7 @@ #import "desktop/options.h" #import "desktop/selection.h" +#import "utils/corestrings.h" #import "utils/filename.h" #import "utils/url.h" @@ -144,12 +145,13 @@ return; /* try to load local files directly. */ - char *scheme; - if (url_scheme(nsurl_access(content_get_url(content)), &scheme) != URL_FUNC_OK) + lwc_string *scheme = nsurl_get_component(hlcache_handle_get_url(content), NSURL_SCHEME); + if (scheme == NULL) return; - if (strcmp(scheme, "file") == 0) - path = url_to_path(nsurl_access(content_get_url(content))); - free(scheme); + + if (lwc_string_isequal(scheme, corestring_lwc_file) == 0) + path = url_to_path(nsurl_access(hlcache_handle_get_url(content))); + lwc_string_unref(scheme); if (path == NULL) { /* We cannot release the requested filename until after it |