Hidden IMAP sub-folder if total length of folder branch exceed 128 char (No error message when path_length for local file for mail folder=".msf" exceeds MS Win's path length limit=256 chars) - Implement extended-length path by using \\?\ prefix on Windows
Categories
(Thunderbird :: Folder and Message Lists, defect)
Tracking
(Not tracked)
People
(Reporter: bugzilla, Unassigned)
References
(Blocks 3 open bugs)
Details
Attachments
(1 file)
|
23.24 KB,
image/png
|
Details |
Comment 4•20 years ago
|
||
Updated•20 years ago
|
Comment 6•20 years ago
|
||
Updated•20 years ago
|
Updated•19 years ago
|
Updated•18 years ago
|
Updated•18 years ago
|
Updated•17 years ago
|
Comment 12•17 years ago
|
||
Comment 13•17 years ago
|
||
Comment 16•13 years ago
|
||
Comment 17•4 years ago
•
|
||
Still looks like an issue, with bug 1785747
Updated•3 years ago
|
Comment 18•2 years ago
|
||
Wow, this "Bug" is ancient... Stumbled across it yesterday and wasted a whole day debugging for one of our users (as it wont happen on my Linux machine this drove me nuts). For the far future you maybe should think of a different way to organize mails than via filesystem hierarchy as even the new maildir still relies on folder-trees to organize the files... (maybe even scrap both ways and use a fast database and only put the attachments to filesystem...)
Could you for now at least show a useful error message on creating, renaming and moving a folder if the new Path would exceed the OSes Limits? At the moment it seems to work (and writes to the IMAP-Server) but the folder is not shown
Also this has not a fixed limit to 128 chars - it depends on how long the base path to the thunderbird profile folder is, how long the URL of the IMAP server is and only then comes the limit inside the mail accounts folder structure...
-> You may update the affected Fields of this bu to Windows 10/11 (or any Windows version) and Thunderbird 115...?
Comment 19•1 year ago
|
||
Still Present on Windows 11 and TB 128esr - I also tried the registry key for longer paths in Windows (https://learn.microsoft.com/de-de/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell) which is available since Windows 10 ver. 1607 but sadly it seems Thunderbird has not been configured / patched to be aware of the now longer path limits?
Comment 20•1 year ago
|
||
As per comment Bug 124287 Comment 31 issue is still happening in TB 136.0b3 (64-bit) on Windows 10.
"...
Also just experienced recently in TB Beta, after moving folders, some of the sub-folders disappeared from TB in my IMAP account without error or noticed, while there were still present in webmail. This prevented access to the folders and emails it contained.
After some lengthy investigation, it turned out the issue was TB not able to create the .msf file for few of the sub-folders because the 255 full file path limit was exceeded on Windows, so Windows itself refused to create such files with too long path.
At least TB shall raise/log the error in such situation, not just silently hide the folder(s).
Part of the issue is that the prefix path to the mailbox folder is already very long something like:
C:\Users\richard\AppData\Roaming\Thunderbird\Profiles\cnantXXX.default\ImapMail\mail.my-domain.com
...so if you then have a many sub-folders the full file path can easily reach/exceed the 255 characters limit of Windows.
Should it be time for TB to start using \\?\ prefix to specify an extended-length path?
For example, \\?\C:\<very long path> rather than just C:\<very long path> which is causing issues on Windows.
..."
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 21•1 year ago
|
||
(In reply to Lukas.Wringer from comment #19)
Still Present on Windows 11 and TB 128esr - I also tried the registry key for longer paths in Windows (https://learn.microsoft.com/de-de/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell) which is available since Windows 10 ver. 1607 but sadly it seems Thunderbird has not been configured / patched to be aware of the now longer path limits?
I wonder what percentage of Windows 10 has this capability. Also, I wonder how important this even is any longer, with Windows 10 slipping into history. At what point should developers just give up on the old stuff, and the slightly less old stuff, and just focus on more modern from X point in time forward. Is there any worth or value to program for diminishing returns?
Comment 22•1 year ago
|
||
(In reply to Worcester12345 from comment #21)
I do not understand your point - "since Windows 10 ver. 1607" means it is a relatively new feature and it exists in Windows 11 and forward as well - so windows 10 being phased out has nothing to do with it...
You may only argue that this feature has to be enabled - but the other solution for this annoying problem would require a complete rebuilt in how Thunderbird stores messages. I personally am fine with both ways if it fixes the issue - but I presume you have somewhat limited resources you would have to triage?
Comment 23•1 year ago
|
||
Sorry, I don't have anything significant to add here other than this capability would need to change in code shared with firefox, which I think is unlikely to happen.
But it certainly would be good to improve messaging to warn the user when this is happening.
Comment 24•1 year ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #23)
Sorry, I don't have anything significant to add here other than this capability would need to change in code shared with firefox, which I think is unlikely to happen.
I don't have the bandwidth for this at the moment (my windows knowledge is a little out of date), but I definitely think it should be done. I'd consider it a reasonably serious flaw.
Path lengths don't tend to be too bad on personal windows machines, but in corporate/institutional settings, they do have a tendency to explode to very unwieldy lengths!
I think the first step is to make up some unit tests which unambiguously illustrate the problem. I suspect the fix wouldn't actually be tooooo hard - it's just the fear of tinkering with such a core low-level part of m-c (the firefox code).
Updated•1 year ago
|
Comment 25•1 year ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #23)
Sorry, I don't have anything significant to add here other than this capability would need to change in code shared with firefox,
I don't think you would need to wait on Firefox change for that to happen in Thunderbird. Can't you simply start using "\?\D:\very long path" (https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry) to access path especially the local cache folder path for IMAP mailboxes for example? Would that really require a change in Firefox?
The first valuable change in Thunderbird, would be definitely to change the error message to clarify the reason why it cannot write to disk due to path to long, with suggestions to help fix the issue.
The second thing Thunderbird could look at is maybe reducing the path towards the local IMAP cache folders...
Currently it may already take 115ish characters path just to reach the root of the mailbox folder:
C:\Users\<username>\AppData\Roaming\Thunderbird\Profiles\eqs5239z.default-beta\ImapMail\remote.my-supperlongdomain.co.uk
...but that is more tricky as this string may change based on user settings.
Finally Thunderbird could start using "\?\D:\very long path" feature, which I don't see how that is dependant on Firefox.
Doesn't Thunderbird already have its own Application manifest updates that would allow it to declare its long path capability/readiness?
https://searchfox.org/comm-central/source/mail/app/thunderbird.exe.manifest
The application manifest must also include the longPathAware element.
XML
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
Comment 26•1 year ago
|
||
For those that may be interested, to fix the issue manually, here is a Powershell script to identify the too long file in ImapMail location (e.g .msf file with too long path) that may be problematic to access within Thunderbird (browsing/compacting):
Get-ChildItem -Recurse -Force | Where-Object {$_.FullName.Length -gt 259}| select @{N="PathLength";E={$_.FullName.Length}},FullName|Sort-Object pathlength -Descending|ft -autosize -wrap
Basically any .msf file with a FullName.length >= 260 character will not be usable by Thunderbird. If you try to access the folder, Thunderbird will raise an error.
For each path found by the script, you would need to rename folders and parent folders within Thunderbird to reduce the path to 259 characters or lower e.g 255.
As notice on Windows 11, Thunderbird may not be able to remove the old too long files (e.g msf) after the rename, but you can manually remove them via File Explorer (manual delete) after the rename occurred.
Comment 27•1 year ago
•
|
||
(In reply to Richard Leger from comment #25)
(In reply to Wayne Mery (:wsmwk) from comment #23)
The first valuable change in Thunderbird, would be definitely to change the error message to clarify the reason why it cannot write to disk due to path to long, with suggestions to help fix the issue.
As per attachment, the error message seems to have been updated already as seen in Thunderbird beta 142.0b2 (64-bit) on Windows 11. It does indicate "full path too long", meaning the full path to the .msf file, within the folder, that cannot be opened by Thunderbird. This of course may also affect compacting, not only browsing for the message list, but I have not seen it yet.
Comment 28•1 year ago
|
||
(In reply to Ben Campbell from comment #24)
...
... I definitely think it should be done. I'd consider it a reasonably serious flaw.
...
I think the first step is to make up some unit tests which unambiguously illustrate the problem. I suspect the fix wouldn't actually be tooooo hard - it's just the fear of tinkering with such a core low-level part of m-c (the firefox code).
Has this "first step" been taken yet?
Description
•