fix bug 35240. Use nsCString to keep mFile for now.
git-svn-id: svn://10.0.0.236/trunk@66363 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
abe206b6a8
commit
34376d1ac5
@ -145,8 +145,6 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
|
||||
// Set user-selected location of file or directory
|
||||
mFile.SetLength(0);
|
||||
if (result == PR_TRUE) {
|
||||
// I think it also needs a conversion here (to unicode since appending to nsString)
|
||||
// but doing that generates garbage file name, weird.
|
||||
mFile.Append(fileBuffer);
|
||||
}
|
||||
|
||||
@ -236,7 +234,7 @@ NS_IMETHODIMP nsFilePicker::GetFile(nsILocalFile **aFile)
|
||||
|
||||
NS_ENSURE_TRUE(file, NS_ERROR_FAILURE);
|
||||
|
||||
file->InitWithPath(nsCAutoString(mFile));
|
||||
file->InitWithPath(mFile);
|
||||
|
||||
NS_ADDREF(*aFile = file);
|
||||
|
||||
@ -248,7 +246,7 @@ NS_IMETHODIMP nsFilePicker::GetFileURL(nsIFileURL **aFileURL)
|
||||
{
|
||||
nsCOMPtr<nsILocalFile> file(do_CreateInstance("component://mozilla/file/local"));
|
||||
NS_ENSURE_TRUE(file, NS_ERROR_FAILURE);
|
||||
file->InitWithPath(nsCAutoString(mFile));
|
||||
file->InitWithPath(mFile);
|
||||
|
||||
nsCOMPtr<nsIFileURL> fileURL(do_CreateInstance("component://netscape/network/standard-url"));
|
||||
NS_ENSURE_TRUE(fileURL, NS_ERROR_FAILURE);
|
||||
|
||||
@ -59,7 +59,7 @@ protected:
|
||||
HWND mWnd;
|
||||
nsString mTitle;
|
||||
PRInt16 mMode;
|
||||
nsString mFile;
|
||||
nsCString mFile;
|
||||
nsString mFilterList;
|
||||
nsString mDefault;
|
||||
nsIUnicodeEncoder* mUnicodeEncoder;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user