Comment 4 for bug 2060534

Revision history for this message
In , Omry Yadan (omry) wrote :

> Is auto compact enabled, or do you do compaction only when it asks/or manually?

I didn't change the setting, so I think it's probably enabled by default.
I dug through the settings now and was not able to locate it.

> The sent folder is also quite large, 50GB.
I noticed that too. I deleted it and it. The reconstructed file is 16GB.

> That's only used for compacting folders. https://searchfox.org/comm-central/rev/1452d8f1e1582cc44529f638e1eba1c7b3804fe4/mailnews/base/src/nsMsgFolderCompactor.cpp#393

It looks like this function is not always cleaning up after itself.
For example, if an exception is thrown here, CleanupTempFilesAfterError is never called:
https://searchfox.org/comm-central/rev/1452d8f1e1582cc44529f638e1eba1c7b3804fe4/mailnews/base/src/nsMsgFolderCompactor.cpp#411

Why not wrap it with a big "try finally" to always delete the file if it exists when the function returns?