mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
nsurl: Set path of "/" for file: URLs with empty path.
This commit is contained in:
parent
465ad9f0ab
commit
372df59f28
@ -952,9 +952,13 @@ static nserror nsurl__create_from_section(const char * const url_s,
|
|||||||
&url->path) != lwc_error_ok) {
|
&url->path) != lwc_error_ok) {
|
||||||
return NSERROR_NOMEM;
|
return NSERROR_NOMEM;
|
||||||
}
|
}
|
||||||
} else if (url->host != NULL &&
|
} else if ((url->host != NULL &&
|
||||||
url->scheme_type != NSURL_SCHEME_MAILTO) {
|
url->scheme_type != NSURL_SCHEME_MAILTO) ||
|
||||||
/* Set empty path to "/", if there's a host */
|
url->scheme_type == NSURL_SCHEME_FILE) {
|
||||||
|
/* Set empty path to "/" if:
|
||||||
|
* - there's a host and its not a mailto: URL
|
||||||
|
* - its a file: URL
|
||||||
|
*/
|
||||||
if (lwc_intern_string("/", SLEN("/"),
|
if (lwc_intern_string("/", SLEN("/"),
|
||||||
&url->path) != lwc_error_ok) {
|
&url->path) != lwc_error_ok) {
|
||||||
return NSERROR_NOMEM;
|
return NSERROR_NOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user