Design problem with folderCache.json: Should not contain platform specific absolute folder paths
Categories
(MailNews Core :: Database, defect, P2)
Tracking
(thunderbird_esr102? affected)
People
(Reporter: rachel, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Steps to reproduce:
The new folderCache.json contains platform specific (backslash on Windows) absolute folder paths. This is unfortunate for the following reasons:
- If a profile is moved or renamed, folderCache.json becomes invalid. This may lead to mass deletion of MSF files.
- It's unclear whether an import of a backed-up profile has the same issue.
- Cross-platform setups are now impossible, like: Have TB installed on a Windows NTFS file system, mount that file system on Linux and use TB on both Linux and Windows.
We don't know what was stored in panacea.dat, likely a non-platform dependent path relative to the profile.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
It also breaks "Thunderbird Portable" where Windows users have executable and profile on a USB device. If the USB device changes drive letter on Windows, the folder cache becomes invalid. Thunderbird portable is not officially supported, however, it doesn't seem to be a good idea to break portable users.
Reporter | ||
Comment 2•2 years ago
|
||
Curiously enough bug 418551 comment #68 questions the correctness of full native folder paths. It's surprising that the full folder path in panacea.dat hasn't caused the issues mentioned in comment #0 and comment #1. Or did any of those actions lead to mass MSF deletions? BTW, deletion of an MSF file happens if its validity check fails due to a missing folder cache (entry):
https://searchfox.org/comm-central/rev/223f0dcefcdcf17bad658dc6907bbe6266d17aa4/mailnews/db/msgdb/src/nsMsgDatabase.cpp#1185
Comment 3•2 years ago
|
||
I concur. Absolute paths should not exist inside any profile file. It's an unnecessary limitation which risks breaking in so many ways and causing spurious bugs. BenC, how hard and how risky would it be to change absolute paths to relative paths in folderCache.json?
If possible, I suggest to fix this as a matter of urgency to avoid rolling this out to more users.
Having cross-platform compatible profiles (also for migration/export/import) will be worthwhile benefit.
Reporter | ||
Comment 4•2 years ago
|
||
This cache here uses the folder URI as key:
https://searchfox.org/comm-central/rev/72a671dd3679d0c91ac6bf82bf45458858479f94/mail/base/content/folderPane.js#1964-1967
Reporter | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
It's not a new change - the old panacea.dat stored paths that way too :-(
Description
•