Bug 524852 drag and drop message to local file system: file with 0 bytes. r/sr=bienvenu
This commit is contained in:
Родитель
c0700da3b5
Коммит
f28669a41c
|
@ -1176,7 +1176,7 @@ function ThreadPaneOnDragStart(aEvent) {
|
|||
aEvent.dataTransfer.mozSetDataAt("text/x-moz-message", messages[i], i);
|
||||
aEvent.dataTransfer.mozSetDataAt("text/x-moz-url",msgUrls.value.spec, i);
|
||||
aEvent.dataTransfer.mozSetDataAt("application/x-moz-file-promise-url",
|
||||
msgUrls.value.spec + "&fileName=" + uniqueFileName,
|
||||
msgUrls.value.spec + "?fileName=" + uniqueFileName,
|
||||
i);
|
||||
aEvent.dataTransfer.mozSetDataAt("application/x-moz-file-promise", null, i);
|
||||
}
|
||||
|
|
|
@ -379,7 +379,6 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetSpec(nsACString &aSpec)
|
|||
return m_baseURL->GetSpec(aSpec);
|
||||
}
|
||||
|
||||
#define FILENAME_PART "&filename="
|
||||
#define FILENAME_PART_LEN 10
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::SetSpec(const nsACString &aSpec)
|
||||
|
@ -387,7 +386,9 @@ NS_IMETHODIMP nsMsgMailNewsUrl::SetSpec(const nsACString &aSpec)
|
|||
nsCAutoString spec(aSpec);
|
||||
// Parse out "filename" attribute if present.
|
||||
char *start, *end;
|
||||
start = PL_strcasestr(spec.BeginWriting(),FILENAME_PART);
|
||||
start = PL_strcasestr(spec.BeginWriting(),"?filename=");
|
||||
if (!start)
|
||||
start = PL_strcasestr(spec.BeginWriting(),"&filename=");
|
||||
if (start)
|
||||
{ // Make sure we only get our own value.
|
||||
end = PL_strcasestr((char*)(start+FILENAME_PART_LEN),"&");
|
||||
|
|
Загрузка…
Ссылка в новой задаче