The default bug view has changed. See this FAQ.

show size on disk for newsgroup folders

RESOLVED FIXED in Thunderbird 23.0

Status

MailNews Core
Networking: NNTP
--
minor
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

Trunk
Thunderbird 23.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

10.25 KB, patch
aceman
: review+
Details | Diff | Splinter Review
(Assignee)

Description

4 years ago
nsMsgNewsFolder::GetSizeOnDisk is not implemented so newsgroup folders show "unknown" size in the folder properties.
(Assignee)

Comment 1

4 years ago
Created attachment 725083 [details] [diff] [review]
patch

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-
(Assignee)

Comment 3

4 years ago
Created attachment 728304 [details] [diff] [review]
patch v2

OK, something like this?
Attachment #725083 - Attachment is obsolete: true
Attachment #728304 - Flags: review?(Pidgeot18)
This patch doesn't apply cleanly?
(Assignee)

Comment 5

4 years ago
Created attachment 733955 [details] [diff] [review]
patch v3

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+
(Assignee)

Comment 7

4 years ago
Created attachment 737552 [details] [diff] [review]
patch v4

OK, thanks.
Attachment #733955 - Attachment is obsolete: true
Attachment #737552 - Flags: review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/8f3d0d5e5dfa
Status: ASSIGNED → RESOLVED
Last Resolved: 4 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.