Closed Bug 1947954 Opened 9 months ago Closed 8 months ago

Stop hashing folder names with non-ASCII characters on Windows

Categories

(MailNews Core :: General, enhancement)

enhancement

Tracking

(relnote-thunderbird 137+)

RESOLVED FIXED
137 Branch
Tracking Status
relnote-thunderbird --- 137+

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

Since who-knows-when, naming mail files on disk has involved making a hash of the folder's name if it can't be converted from Unicode to "native" encoding and back again. This only affected Windows as everywhere else uses a sensible native encoding. As far as I can tell it hasn't actually been necessary since about 2006, when the code for handling files stopped using native encoding. So we should stop doing it.

This is a backwards-incompatible change in one case: if a new folder is created and then the program is downgraded, older versions won't be able to handle the file name and will start making new files with the hashed name, so it will appear as though the folder's contents are gone. In fact the data will still be there, just unusable by the old version.

Attachment #9465876 - Attachment description: Bug 1947954 - Stop hashing folder names with non-ASCII on Windows. r=#thunderbird-back-end-reviewers → Bug 1947954 - Stop hashing folder names with non-ASCII characters on Windows. r=#thunderbird-back-end-reviewers

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/62450e0d193b
Stop hashing folder names with non-ASCII characters on Windows. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

Release Note Request (optional, but appreciated)
[Why is this notable]: This is a backwards-incompatible change. New folders made after this change may disappear if the user downgrades.
[Suggested wording]: File names used when storing mail folders (Windows only).
[Links (documentation, blog post, etc)]: None, but I'll write a bit here for people who find this bug:


When you name a mail folder with characters that can't be used to name a file because the operating system won't allow them, Thunderbird creates a different file name. On Windows this also happened to many other characters, because when the code was written using those characters wasn't possible. I've removed that restriction and Thunderbird now behaves the same way on Windows as it does on other operating systems.

If have created a folder using a version of Thunderbird containing this change, then gone back to an older version, your new folder may disappear or appear empty. To work around this:

  • Close Thunderbird
  • Locate your profile folder and the mail folder in question (inside the Mail or ImapMail folder in your profile) and rename the files to only use the characters A to Z.
  • Open Thunderbird. Your folder should be there and contain your mail as before.
  • Rename the folder back to the name you want.
Summary: Stop hashing folder names with non-ASCII on Windows → Stop hashing folder names with non-ASCII characters on Windows
See Also: → 1946011
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: