Closed Bug 1287223 Opened 10 years ago Closed 1 year ago

duplicated mbox files Sent and Sent-1

Categories

(Thunderbird :: Untriaged, defect)

38 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1921694

People

(Reporter: lopezibanez, Unassigned)

References

Details

(Whiteboard: [dupeme])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20160606113944 Actual results: While investigating why my Thunderbird profile consumes so much disk space, I noticed that under ImapMail there are two Sent and Sent-1 mbox files that are similar in size but not identical. Of course, I only have one sent folder in this account. Why would Thunderbird create two files for the same folder? Can either of the files be safely deleted? Is there a safe way to handle this problem? I can see other duplicates in other accounts. There are also files with names like INBOX-7, but there is no INBOX or INBOX-6.
I'd like to know, too. I've seen Drafts and Drafts-1 but I was never able to work out what's going on behind the scenes. Who knows something about this?
Flags: needinfo?(rkent)
Flags: needinfo?(mkmelin+mozilla)
I don't have any idea why they are created.
Flags: needinfo?(mkmelin+mozilla)
Coincidentally, I am just in the middle of pouring over the code that creates this in association with my work on bug 1285679. This code in nsMsgFolderCompactor.cpp creates the -1.msf file: // First we're going to try and move the old summary file out the way. // We don't delete it yet, as we want to keep the files in sync. nsCOMPtr<nsIFile> tempSummaryFile; rv = oldSummaryFile->Clone(getter_AddRefs(tempSummaryFile)); if (NS_SUCCEEDED(rv)) rv = tempSummaryFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
Flags: needinfo?(rkent)
I also don't know why they appear, but they do and since forever. But I think there are already bugs about this, e.g. bug 707446.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Maybe we should dupe this bug to some old bug.
See Also: → 707446
(In reply to Jorg K (GMT+2, PTO during summer) from comment #5) > Maybe we should dupe this bug to some old bug. Note that this is not the same. Additional *.msf files are fine. I can delete those safely and, if needed, they will get recreated. I'm not sure if I can safely delete the Sent-1 file (or should I delete the Sent file?). If I delete the wrong one I lose my mail forever. It is also not clear for a user if Thunderbird needs both files or whether all the data from one is contained in the other (a simple diff was not able to show this clearly).
(In reply to :aceman from comment #4) > I also don't know why they appear, but they do and since forever. > But I think there are already bugs about this, e.g. bug 707446. This is also about duplicated msf file. Those are safe to remove (and Thunderbird should simply remove all of them when the user compacts the folders).
(In reply to M Lopez-Ibanez from comment #6) > Note that this is not the same. Additional *.msf files are fine. I can > delete those safely and, if needed, they will get recreated. Yes, thanks for noticing. > I'm not sure if I can safely delete the Sent-1 file (or should I delete the > Sent file?). If I delete the wrong one I lose my mail forever. It is also > not clear for a user if Thunderbird needs both files or whether all the data > from one is contained in the other (a simple diff was not able to show this > clearly). But you said you are on IMAP? In that case all the email should still be on the server even if you would wipe your local TB profile/files.
I misread this is about duplicated .msf files.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Whiteboard: [dupeme]

(In reply to gene smith from bug 1624699 comment #7)

Not Alfred, but I've seen the -N folders appear when you unsubscribed and then re-subscribe to the folder. Tb has to re-download headers (foo.msf) and mbox files (foo) after a resubscribe so it keeps the previous named files as backup and and creates new ones with a incremental suffix.

Indeed it's that simple. Un- and resubscribe a folder.

But I don't agree with you because of the /backup/ thing.

If I create a new folder the corresponding folder.msf is created.
If I unsubscribe that folder that file is removed out of the profile.
On resubscribe two files folder.msf and folder-1.msf get created.
When I now unsubscribe only folder-1.msf is deleted.
And after another resubscribe folder-1.msf and a new folder-2.msf is created
...to be continued.

(In reply to Alfred Peters from comment #11)

(In reply to gene smith from bug 1624699 comment #7)

Not Alfred, but I've seen the -N folders appear when you unsubscribed and then re-subscribe to the folder. Tb has to re-download headers (foo.msf) and mbox files (foo) after a resubscribe so it keeps the previous named files as backup and and creates new ones with a incremental suffix.

Indeed it's that simple. Un- and resubscribe a folder.

Just tried it and don't see it. I unsubscribed from existing folder cc. On restart file cc and cc.msf were gone. Sub'd to cc again and on restart cc and cc.msf came back after being clicked on, etc. This is with "check for mail at startup" turned off.

Same with "check for mail at startup" turned on.

Also, tried creating a new folder like you did and don't see the problem.

Severity: normal → S3

Another example (with Archive.sbd): bug 1751993

See Also: → 1751993

I encountered this today, deleting 11 extra copies of my 300+ MB IMAP inbox when going in to look for and delete nstmp files (see bug 1878541, which was fixed for the upcoming 130 version). This appears to be another similar example of Thunderbird creating and not deleting some kind of extra temp file, just like the nstmp bug. Can a fix similar to that one be applied to this bug?

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1921694
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.