nsIMsgFolder::sizeOnDiskWithSubFolders does not work with smart folders in the unified folders view
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
People
(Reporter: babolivier, Assigned: babolivier)
References
(Regression)
Details
(Keywords: regression)
Such folders have no sub-folders, so sizeOnDiskWithSubFolders is 0.
| Assignee | ||
Comment 1•2 years ago
|
||
From an initial investigation, it looks like the relationship between a smart folder and its "children" only exists in the frontend. When SmartServerUtils.getSmartServer() is called, it iterates over a list of flags, and for each flag it doesn't have a folder for, it lists the folders with the same flag on each account and adds them to the searchFolderUri property of the folder's info (which is then read when wrapping the folder into a virtual folder wrapper and calling wrappedFolder.searchFolders()).
TL;DR: smart folders don't have subfolders as far as the backend is concerned (regardless of the frontend rendering them otherwise), they have search folders, and this relation is represented in a completely different way in the backend (which is not much besides a char property for the frontend to use).
| Assignee | ||
Comment 2•2 years ago
|
||
After chatting with Martin and Vineet, we concluded the best fix for this is to special-case smart folders and calculate their size on the frontend, and use the sizeOnDiskWithSubFolders property for any other folder. I'll close this bug and let Vineet update the patch for bug 1834510.
Comment 3•2 years ago
|
||
This bug doesn't have a patch, plus the patch hasn't yet landed in bug 1834510, so changing this to duplicate of bug 1834510
Description
•