ThreadPaneOnDragStart() should use same logic or code as SaveAsFile() for ".eml" file name generation

NEW
Unassigned

Status

4 years ago
4 years ago

People

(Reporter: World, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
ThreadPaneOnDragStart() should use same logic or code as SaveAsFile() for ".eml"  file name generation.

http://mxr.mozilla.org/comm-central/source/mail/base/content/mailCommands.js#342
342 function SaveAsFile(uris)
349     if (msgHdr.flags & Components.interfaces.nsMsgMessageFlags.HasRe)
350       name = (name) ? "Re: " + name : "Re: ";
352     let filename = GenerateValidFilename(name, ".eml");

http://mxr.mozilla.org/comm-central/source/mail/base/content/msgMail3PaneWindow.js#1379
1379 function ThreadPaneOnDragStart(aEvent) {
1421     if (!subject) {
1422       uniqueFileName = noSubjectString;
1423     } else {
1424       uniqueFileName = (subject.length <= maxUncutNameLength) ?
1425                        subject : subject.substr(0, maxCutNameLength) + longSubjectTruncator;
1426     }
1427     uniqueFileName = suggestUniqueFileName(uniqueFileName, ".eml", fileNames);

Due to above difference, when Subject has Re:, SaveAs generates "Re subject_text.eml", but Drag&Drop generares "subject_text.eml".
Is it intentional or by design?
You need to log in before you can comment on or make changes to this bug.