After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 329879 - directory properties: size doesn't count hidden files
directory properties: size doesn't count hidden files
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Properties Dialog
3.8.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 345966 525136 568441 603089 612564 626167 638338 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-04 11:23 UTC by Emmanuel Touzery
Modified: 2019-04-13 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing the two problems: "Contents: Nothing", "0 Objects" (82.24 KB, image/png)
2009-01-21 16:07 UTC, Jakob Unterwurzacher
  Details
patch that includes hidden and backup files while counting files (697 bytes, patch)
2009-05-14 09:41 UTC, Rohini
none Details | Review
Patch against git master to add functionality to get more precise size and counting data (12.76 KB, patch)
2010-06-29 21:34 UTC, Marcus Carlson
needs-work Details | Review
Files 3.8.6 bug screenshot (65.51 KB, image/png)
2013-10-02 22:26 UTC, Jakob Unterwurzacher
  Details

Description Emmanuel Touzery 2006-02-04 11:23:16 UTC
Please describe the problem:
When right-clicking "properties" on a folder, you get the properties dialog.
In the first tab "Basic" you can see "Contents" with the total size of items in
the folder.
Those contents say how many files are there for how much size. But it doesn't
count hidden files and folders!
If that folder contains only hidden files & folders, it shows "Contents: nothing".

Since that size is used often to know if some folder will fit on a CD/floppy
etc, that size should also include hidden files and folders.
Since the contents also say "nothing" people might delete folders which actually
contain data, maybe even important data. dataloss is bad...

Steps to reproduce:
1. right click on a folder containing only hidden files and folders
2. choose "properties"
3. contents says "nothing" even though the directory is not empty.


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Sebastien Bacher 2006-03-24 21:18:37 UTC
might be a duplicate of bug #319584

Ubuntu has a similar bug: https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/33883

"hidden files not included in directory 'properties'

Nautilus 2.13.91 under Dapper Flyer 4 and Nautilus 2.12.1 under Breezy.

Expected behaviour
* upon right clicking a directory and choosing properties the numbers in the 'contents' will include all files and folders.

Actual behaviour:
* lists only non-hidden files

Workaround
* open the directory, set 'show hidden files' to 'yes', choose select all, select properties."
Comment 2 Wouter Bolsterlee (uws) 2006-08-15 21:28:55 UTC
*** Bug 345966 has been marked as a duplicate of this bug. ***
Comment 3 Duncan Lithgow 2006-11-15 15:09:13 UTC
I thought I'd just mention that this issue is still present in nautilus 2.16.1
Comment 4 Duncan Lithgow 2007-03-21 19:32:51 UTC
Still there in Nautilus 2.18.0.1
Comment 5 Duncan Lithgow 2007-08-13 10:18:49 UTC
... and now Nautilus 2.19.6
Comment 6 Cosimo Cecchi 2008-01-29 01:24:42 UTC
Confirming in 2.21.6.
Comment 7 Cosimo Cecchi 2008-04-01 12:16:24 UTC
*** Bug 525136 has been marked as a duplicate of this bug. ***
Comment 8 Paweł Paprota 2008-04-15 20:53:01 UTC
I can't reproduce this problem with the latest trunk. I investigated it and I think this may have been fixed by the following check-in:

r13538 | alexl | 2007-12-20 14:33:30 +0100 (Thu, 20 Dec 2007) | 19 lines

2007-12-20  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-customization-data.c:
        * libnautilus-private/nautilus-directory-async.c:
        * libnautilus-private/nautilus-dnd.c:
        * libnautilus-private/nautilus-file-operations.c:
        * libnautilus-private/nautilus-file-utilities.c:
        * libnautilus-private/nautilus-file.c:
        * libnautilus-private/nautilus-icon-dnd.c:
        * libnautilus-private/nautilus-link.c:
        * libnautilus-private/nautilus-search-engine-simple.c:
        * libnautilus-private/nautilus-trash-monitor.c:
        * src/file-manager/fm-directory-view.c:
        * src/file-manager/fm-properties-window.c:
        * src/nautilus-pathbar.c:
        * src/nautilus-property-browser.c:
	Update to new gio file attribute names


------------------------------------------------------------------------

g_file_enumerate_children_async now takes G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN so it should count hidden files.
Comment 9 Cosimo Cecchi 2008-04-15 23:05:09 UTC
I can still reproduce this with 2.22.2, so I believe it's not fixed.
Comment 10 Paweł Paprota 2008-04-16 06:56:23 UTC
Hmmm... then maybe I'm doing something wrong... I set up the following directory structure:

test/
test/.aaa <- file

Properties show "1 item, with size 0 bytes". Hidden subdirectories are also counted properly. Do you have some suggestions on how I could reproduce it?
Comment 11 Cosimo Cecchi 2008-04-16 09:37:54 UTC
With exactly the steps you described, I get "Contents: nothing" here in the properties.
Comment 12 Markus 2008-06-05 22:11:21 UTC
I get the same problem from Nautilus 2.22.3 Ubuntu Hardy, the bug also appears in the main folder view when Icon captions are activated. "Size" then shows "0 Items" for a folder with hidden items in it. I also get "Contents: nothing" when consulting the folder properties.

nautilus-2.22.3-0ubuntu2
Comment 13 Sebastien Bacher 2008-06-25 08:29:36 UTC
the bug seems to be fixed too on my intrepid GNOME version
Comment 14 Cosimo Cecchi 2009-01-21 11:17:57 UTC
*** Bug 568441 has been marked as a duplicate of this bug. ***
Comment 15 Jakob Unterwurzacher 2009-01-21 16:07:07 UTC
Created attachment 126928 [details]
Screenshot showing the two problems: "Contents: Nothing", "0 Objects"
Comment 16 Rohini 2009-05-14 09:41:16 UTC
Created attachment 134633 [details] [review]
patch that includes hidden and backup files while counting files
Comment 17 Pacho Ramos 2009-06-17 13:06:53 UTC
This seems to work ok for me when I set "Show hidden and backup files" from preferences window, but doesn't work when I set it from "View -> Show hidden files" menu
Comment 18 Pacho Ramos 2009-06-17 19:02:05 UTC
I forgot to say (regarding to version) that I suffer this with 2.24 under gentoo and people under mandriva (https://qa.mandriva.com/show_bug.cgi?id=51691) are seeing this with 2.26
Comment 19 Cosimo Cecchi 2010-04-09 16:17:06 UTC
*** Bug 612564 has been marked as a duplicate of this bug. ***
Comment 20 Cosimo Cecchi 2010-05-02 15:00:52 UTC
*** Bug 603089 has been marked as a duplicate of this bug. ***
Comment 21 Martin Kunev 2010-05-02 20:06:22 UTC
I still see this bug in Nautilus 2.28.4
Comment 22 Robin Stocker 2010-06-08 13:51:02 UTC
This is pretty confusing for directories where there's a .git or a .hg directory, which isn't counted.

And then you do a "du" in a terminal and discover that nautilus can't be trusted *sigh*.
Comment 23 Marcus Carlson 2010-06-29 21:34:49 UTC
Created attachment 164925 [details] [review]
Patch against git master to add functionality to get more precise size and counting data

How about a patch like this? With this it's possible to separate hidden files from the visible ones (not done in this patch though). (For example: "Content: 10 items (5 hidden), 10MB"). Here properties show the total number of files and their size but in the status bar when selecting a folder it does not (except if you enable show hidden and backup files).

Comments?
Comment 24 Martin Kunev 2010-06-29 21:44:16 UTC
I think that something like "Content: 10 items (5 hidden), 10MB" is the best choice. That way there will be no confusion on how there are 10 items in the directory when only 5 are visible.
Comment 25 Vish 2010-06-30 04:53:11 UTC
(In reply to comment #24)
> I think that something like "Content: 10 items (5 hidden), 10MB" is the best
> choice. That way there will be no confusion on how there are 10 items in the
> directory when only 5 are visible.

Nautilus already paints a blurry picture with "Content" , which includes files and folders. Adding "hidden" will be even more confusing.
If we have A/a/b/c/7files , the content of A is 10 , often we don't tend to think of folders as an item.

If we have a hidden count , it will not be clear what is hidden , a file or a folder?

However, it can be confusing if we dont have a hidden count too.

 Let's keep it a simple *total* count with a closed expander:

> Content: N items , totalling N MB

When expanded, we show details:

v Content: N items , totalling N MB
  Folders: N (N hidden)
  Files  : N (N hidden)
Comment 26 Marcus Carlson 2010-06-30 06:14:19 UTC
After thinking about it the patch is not perfect unless we'd like it to behave like this; if you enter a hidden folder such as /home/me/.secrets/ and show properties on the document folder, all files and folders therein would be shown as hidden. Probably not what we wanted - right?

Also vish, it's still difficult to count as hidden, would files in a hidden folder count as hidden or not?
Comment 27 Vish 2010-07-04 14:38:35 UTC
(In reply to comment #26)
> 
> Also vish, it's still difficult to count as hidden, would files in a hidden
> folder count as hidden or not?

If we start doing that , it would get a whole lot confusing! :)

Lets just keep hidden/not-hidden depending on the individual file or folder, Irrespective of being inside a hidden folder or not.
Comment 28 Marcus Carlson 2010-08-09 21:14:57 UTC
*** Bug 626167 has been marked as a duplicate of this bug. ***
Comment 29 Stefano Teso 2011-03-16 11:22:49 UTC
*** Bug 638338 has been marked as a duplicate of this bug. ***
Comment 30 David Clayton 2012-01-26 08:35:00 UTC
If this is NOT going to be fixed to show the hidden file/folders in the count, at least change the "Contents" string on the Properties screen to have a notification so people know the true situation. Something like:
----------
"Contents: 23,895 items, totalling 2.9 GB
(some contents unreadable)
(Enable "Show hidden and backup files in Preferences to also count these files)
----------
But only display that string if this setting is not enabled.

This should be a very simple bit of coding that should be rolled out to all versions of Nautilus, it is totally unacceptable to leave the current misleading situation as it is.
Comment 31 Duncan Lithgow 2012-01-30 19:32:08 UTC
Hej Marcus and Martin, if you're still out there it would be great if you could finish thinking through a good solution to this one ... been a (not insignificant) bug for 5 or 6 six years now.
Comment 32 Jakob Unterwurzacher 2013-10-02 22:26:45 UTC
Created attachment 256333 [details]
Files 3.8.6 bug screenshot

Still the exact same bug in Gnome 3.8.6 (screenshot attached).
Comment 33 Jakob Unterwurzacher 2013-10-02 22:29:25 UTC
Gnome 3.8.2, I'm sorry.
Comment 34 André Klapper 2015-01-17 02:09:19 UTC
Comment on attachment 164925 [details] [review]
Patch against git master to add functionality to get more precise size and counting data

src/file-manager/ does not exist anymore in git master. Hence setting 'needs-rework' as patch does not apply cleanly.
Comment 35 António Fernandes 2019-04-13 18:56:11 UTC
This issue has been reported on GitLab. https://gitlab.gnome.org/GNOME/nautilus/issues/638

Closing here.