Provided implementation for the file fixup work.
git-svn-id: svn://10.0.0.236/trunk@65692 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1bac2e91d8
commit
d35db358c7
@ -2332,7 +2332,19 @@ NS_IMETHODIMP nsDocShell::FileURIFixup(const PRUnichar* aStringURI,
|
||||
nsAutoString uriSpec(aStringURI);
|
||||
|
||||
ConvertFileToStringURI(uriSpec, uriSpec);
|
||||
return NS_OK;
|
||||
|
||||
if(0 == uriSpec.Find("file:", 0))
|
||||
{
|
||||
// if this is file url, we need to convert the URI
|
||||
// from Unicode to the FS charset
|
||||
nsCAutoString inFSCharset;
|
||||
NS_ENSURE_SUCCESS(ConvertStringURIToFileCharset(uriSpec, inFSCharset),
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
if(NS_SUCCEEDED(NS_NewURI(aURI, inFSCharset.GetBuffer(), nsnull)))
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#define FILE_PROTOCOL "file://"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user