diff --git a/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 1e10550ffd1..5c835178b29 100644 --- a/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -1554,11 +1554,11 @@ nsresult nsWebBrowserPersist::SaveDocumentInternal( break; } - nsCAutoString dirName; - dataDirParent->GetNativeLeafName(dirName); + nsAutoString dirName; + dataDirParent->GetLeafName(dirName); nsCAutoString newRelativePathToData; - newRelativePathToData = dirName + newRelativePathToData = NS_ConvertUTF16toUTF8(dirName) + NS_LITERAL_CSTRING("/") + relativePathToData; relativePathToData = newRelativePathToData; @@ -2223,7 +2223,7 @@ nsWebBrowserPersist::CalculateAndAppendFileExt(nsIURI *aURI, nsIChannel *aChanne if (localFile) { - localFile->SetNativeLeafName(newFileName); + localFile->SetLeafName(NS_ConvertUTF8toUTF16(newFileName)); // Resync the URI with the file after the extension has been appended nsCOMPtr fileURL = do_QueryInterface(aURI, &rv);