mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 454024 "ftp:///" (no hostname) gives an empty list of files instead of an error. r=jduell
This commit is contained in:
parent
c8f536e878
commit
9d415704e0
@ -1706,6 +1706,13 @@ nsFtpState::Init(nsFtpChannel *channel)
|
||||
nsresult rv;
|
||||
nsCAutoString path;
|
||||
nsCOMPtr<nsIURL> url = do_QueryInterface(mChannel->URI());
|
||||
|
||||
nsCString host;
|
||||
url->GetAsciiHost(host);
|
||||
if (host.IsEmpty()) {
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
|
||||
if (url) {
|
||||
rv = url->GetFilePath(path);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user