[TRUNK] FTP listing is not working properly for native filename, unable to download. r=nhotta, sr=darin, bug=165585

git-svn-id: svn://10.0.0.236/trunk@128734 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%netscape.com 2002-09-03 21:51:24 +00:00
parent 3262ed554b
commit 783310b108

View File

@ -443,6 +443,7 @@ NS_IMETHODIMP
nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest,
nsISupports *aCtxt,
nsIDirIndex *aIndex) {
nsresult rv;
if (!aIndex)
return NS_ERROR_NULL_POINTER;
@ -460,7 +461,21 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest,
nsXPIDLCString loc;
aIndex->GetLocation(getter_Copies(loc));
pushBuffer.AppendWithConversion(loc);
if (!mTextToSubURI) {
mTextToSubURI = do_GetService(NS_ITEXTTOSUBURI_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
}
nsXPIDLCString encoding;
rv = mParser->GetEncoding(getter_Copies(encoding));
if (NS_FAILED(rv)) return rv;
nsXPIDLString unEscapeSpec;
rv = mTextToSubURI->UnEscapeAndConvert(encoding, loc,
getter_Copies(unEscapeSpec));
if (NS_FAILED(rv)) return rv;
pushBuffer.Append(unEscapeSpec);
pushBuffer.Append(NS_LITERAL_STRING("\"><img src=\""));