threadPane._onDragStart/ThreadPaneOnDragStart() should use same logic or code as SaveAsFile() for ".eml" file name generation
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
People
(Reporter: World, Assigned: welpy-cw)
References
Details
(Keywords: leave-open)
Attachments
(3 files, 2 obsolete files)
Updated•3 years ago
|
Comment 1•6 months ago
|
||
https://searchfox.org/comm-central/rev/53f8d49164c269f0936f7415c969320becbb0c25/mail/base/content/about3Pane.js#5379
https://searchfox.org/comm-central/rev/53f8d49164c269f0936f7415c969320becbb0c25/mail/base/content/mailCommands.js#503
| Assignee | ||
Comment 2•3 months ago
•
|
||
Move sanitisation, shortening and uniqueness of message filenames into a new
nsIMsgFilenameUtils service that accounts for the actual destination path, and
drive batch saving of messages from the front end, so filenames are resolved
against the folder the user picks. The protocols which write the file
themselves (IMAP, EWS and NNTP) now write into the existing file instead of
replacing it, so that the file the front end creates to reserve a name stays
reserved until the save has finished.
The sanitising rules are portable, but the amount of room a name has is not:
the budget is PATH_MAX bytes of the native path on POSIX and MAX_PATH UTF-16
units on Windows, and neither the limits nor the native path (nsIFile's
nativePath() is [notxpcom]) are reachable from JS. Keeping the logic in C++
behind an XPCOM interface leaves one implementation shared by the front end and
by C++ callers, instead of having each of them approximate the platform's
limits.
Further code which turns untrusted text into an on-disk name can be
consolidated here later. NS_MsgHashIfNecessary() in nsMsgUtils.cpp, used for
folder, mbox and offline store names, truncates and hashes above a fixed 55
characters, without checking for reserved device names or counting bytes.
| Comment hidden (obsolete) |
| Assignee | ||
Comment 4•3 months ago
|
||
This removes the frontend workaround in mailCommands.js that used top.saveURL
for standalone .eml files, properly routing the operation through messenger.saveAs
and the C++ backend.
Key backend changes in nsMailboxService.cpp:
- Moved the
file:tomailbox:URI conversion logic fromFetchMessagedown
intoPrepareMessageUrl. This allowsfile:URIs to be properly processed
by all mailbox actions, most notablySaveMessageToDisk. - Fixed a URI construction bug where
number=0was appended with an&
without checking if a?query string already existed. - Forced
addDummyEnvelopeto true forfile:URIs inSaveMessageToDisk
to prevent the mailbox protocol from swallowing the first header line
(since .eml files lack the mbox "From " separator).
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/72f24353e83a
Route standalone EML saves through the mailbox backend. r=mkmelin
Updated•19 days ago
|
| Comment hidden (obsolete) |
| Assignee | ||
Comment 7•19 days ago
|
||
Migrate nsMessenger prompts and file picker strings, message drag fallback
filenames, and the open-message file picker from messenger.properties.
Reuse existing attachment messages and format C++ strings with
LocalizeMessage.
Add the locale migration recipe and focused filename and picker tests.
The path length strings are not yet in the localization source, so their
existing English values are seeded by the recipe.
Updated•12 days ago
|
Updated•12 days ago
|
Updated•12 days ago
|
Updated•10 days ago
|
Updated•10 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Updated•7 days ago
|
Updated•7 days ago
|
Updated•3 days ago
|
| Assignee | ||
Updated•2 days ago
|
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/1277e5088c80
Migrate message file strings to Fluent. r=mkmelin,tobyp,dandarnell
Description
•