Open Bug 100242 Opened 23 years ago Updated 2 years ago

"ref count" special folder flags, as a given folder can be the sent folder for several accounts

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(Not tracked)

People

(Reporter: sspitzer, Unassigned)

References

Details

(Whiteboard: [SmBugEvent])

"ref count" special folder flags, as a given folder can be the sent folder for several accounts spun off from #95709. keeping track of the count may not be the best solution, I might choose to clear the sent flag after checking first if no other accounts point to the folder.
Product: Browser → Seamonkey
Assignee: sspitzer → mail
Assignee: mail → nobody
QA Contact: esther → message-display
This bug is being marked EXPIRED as it has seen no activity in a very long time. If you think that the issue reported might still be relevant, please test with a recent release of SeaMonkey and if the problem persists feel free to re-open the report. Thank you. http://www.seamonkey-project.org/
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → EXPIRED
Bulk reopening incorrectly expired bugs - no activity does not constitute no bug - these need proper checking.
Status: RESOLVED → REOPENED
Resolution: EXPIRED → ---
Status: REOPENED → UNCONFIRMED
Component: MailNews: Message Display → Backend
Product: SeaMonkey → MailNews Core
QA Contact: message-display → backend
Whiteboard: [SmBugEvent]
bienvenu, what's your thought on this antique? (In reply to (not reading, please use seth@sspitzer.org instead) from comment #0) > "ref count" special folder flags, as a given folder can be the sent folder > for > several accounts > > spun off from #95709. > > keeping track of the count may not be the best solution, I might choose to > clear the sent flag after checking first if no other accounts point to the > folder.
(In reply to Wayne Mery (:wsmwk) from comment #3) > > keeping track of the count may not be the best solution, I might choose to > > clear the sent flag after checking first if no other accounts point to the > > folder. Yeah, that's the way to go.
I think this still exists. And for other types of special folders. E.g. if 2 accounts store Junk into one folder and one of them is then changed to another folder. The junk icon of the first folder is removed until restart, where special code runs to add missing junk flags again. Would the solution be to change the generic ClearFlag function to check if any other account points to this folder. However that is quite expensive and even hard. E.g. to check if Drafts or Templates flag can be removed, we'd have to iterate all identities. Which means, it can be done, but requires knowledge about who sets these flags and how. That duplicates logic. Refcounting would be a more universal solution.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mozilla)
Hardware: x86 → All
with modest hopes, assuming aceman still wants more info, rerouting to rkent (In reply to :aceman from comment #5) > Would the solution be to change the generic ClearFlag function to check if > any other account points to this folder. However that is quite expensive and > even hard. E.g. to check if Drafts or Templates flag can be removed, we'd > have to iterate all identities. Which means, it can be done, but requires > knowledge about who sets these flags and how. That duplicates logic. > Refcounting would be a more universal solution.
Flags: needinfo?(mozilla) → needinfo?(kent)
For fcc, draft, template, and archives, the use is stored in the identity. It would be fairly straightforward to write a routine that could count usages of a particular folder in these different categories by scanning the identities. I don't see this as hard or expensive, particularly since the need to do this is fairly rare. Reference counting sounds easy in theory, but is hard to get right in practice. That's why we make smart pointers to standardize the application. So if this bug is going to move forward, I would second comment 4 that says scanning for other usages of the flag is the right approach. Or were you hoping that I would take the bug and do the work?
Flags: needinfo?(kent)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.