Closed Bug 851275 Opened 11 years ago Closed 11 years ago

show size on disk for newsgroup folders

Categories

(MailNews Core :: Networking: NNTP, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 23.0

People

(Reporter: aceman, Assigned: aceman)

Details

Attachments

(1 file, 3 obsolete files)

nsMsgNewsFolder::GetSizeOnDisk is not implemented so newsgroup folders show "unknown" size in the folder properties.
Attached patch patch (obsolete) — Splinter Review
So this is a crude patch to get the size directly from the file holding the folder. Is that acceptable/fast enough? Other folder types maintain a mFolderSize variable and change the value when operations are done on the folder. I am not sure that is needed here too.
Attachment #725083 - Flags: review?(Pidgeot18)
Comment on attachment 725083 [details] [diff] [review]
patch

Review of attachment 725083 [details] [diff] [review]:
-----------------------------------------------------------------

This code isn't quite right--it should be caching the value in mFolderSize and using that. See nsLocalMailFolder for what that implementation looks like.
Attachment #725083 - Flags: review?(Pidgeot18) → review-
Attached patch patch v2 (obsolete) — Splinter Review
OK, something like this?
Attachment #725083 - Attachment is obsolete: true
Attachment #728304 - Flags: review?(Pidgeot18)
This patch doesn't apply cleanly?
Attached patch patch v3 (obsolete) — Splinter Review
Does not any longer. Try this.
Attachment #728304 - Attachment is obsolete: true
Attachment #728304 - Flags: review?(Pidgeot18)
Attachment #733955 - Flags: review?(Pidgeot18)
Comment on attachment 733955 [details] [diff] [review]
patch v3

Review of attachment 733955 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/news/src/nsNewsFolder.cpp
@@ +829,5 @@
> +
> +  // 0 is a valid folder size (meaning empty file with no offline messages),
> +  // but 1 is not. So use 1 as a special value meaning no file size was fetched
> +  // from disk yet.
> +  if (mFolderSize == kSizeUnknown) {

The brace style here is supposed to be:
if ()
{
}
else
{
}
Attachment #733955 - Flags: review?(Pidgeot18) → review+
Attached patch patch v4Splinter Review
OK, thanks.
Attachment #733955 - Attachment is obsolete: true
Attachment #737552 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/8f3d0d5e5dfa
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 23.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: