Closed Bug 1776265 Opened 2 years ago Closed 2 years ago

Design problem with folderCache.json: Should not contain platform specific absolute folder paths

Categories

(MailNews Core :: Database, defect, P2)

Thunderbird 102

Tracking

(thunderbird_esr102? affected)

RESOLVED DUPLICATE of bug 1726660
Tracking Status
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.

Blocks: tb102found

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.

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

Keywords: regression
Regressed by: 418551

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.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(benc)
Priority: -- → P2

It's not a new change - the old panacea.dat stored paths that way too :-(

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(benc)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.