Bug #23894 --> be sure to unescape the attachment's display name before brining up the file picker.

r=sspitzer
This commit is contained in:
mscott%netscape.com 2000-01-15 01:41:52 +00:00
parent 72bb036628
commit 687e264d13

View File

@ -360,9 +360,10 @@ nsMessenger::OpenAttachment(const char * url, const char * displayName,
fileSpec(getter_AddRefs(NS_CreateFileSpecWithUI())); fileSpec(getter_AddRefs(NS_CreateFileSpecWithUI()));
if (!fileSpec) goto done; if (!fileSpec) goto done;
char * unescapedDisplayName = nsCRT::strdup(displayName);
rv = fileSpec->ChooseOutputFile("Save Attachment", displayName, rv = fileSpec->ChooseOutputFile("Save Attachment", nsUnescape(unescapedDisplayName),
nsIFileSpecWithUI::eAllFiles); nsIFileSpecWithUI::eAllFiles);
nsCRT::free(unescapedDisplayName);
if (NS_FAILED(rv)) goto done; if (NS_FAILED(rv)) goto done;
aSpec = do_QueryInterface(fileSpec, &rv); aSpec = do_QueryInterface(fileSpec, &rv);