GNOME Bugzilla – Bug 329879
directory properties: size doesn't count hidden files
Last modified: 2019-04-13 18:56:11 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:
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."
*** Bug 345966 has been marked as a duplicate of this bug. ***
I thought I'd just mention that this issue is still present in nautilus 2.16.1
Still there in Nautilus 2.18.0.1
... and now Nautilus 2.19.6
Confirming in 2.21.6.
*** Bug 525136 has been marked as a duplicate of this bug. ***
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.
I can still reproduce this with 2.22.2, so I believe it's not fixed.
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?
With exactly the steps you described, I get "Contents: nothing" here in the properties.
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
the bug seems to be fixed too on my intrepid GNOME version
*** Bug 568441 has been marked as a duplicate of this bug. ***
Created attachment 126928 [details] Screenshot showing the two problems: "Contents: Nothing", "0 Objects"
Created attachment 134633 [details] [review] patch that includes hidden and backup files while counting files
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
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
*** Bug 612564 has been marked as a duplicate of this bug. ***
*** Bug 603089 has been marked as a duplicate of this bug. ***
I still see this bug in Nautilus 2.28.4
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*.
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?
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.
(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)
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?
(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.
*** Bug 626167 has been marked as a duplicate of this bug. ***
*** Bug 638338 has been marked as a duplicate of this bug. ***
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.
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.
Created attachment 256333 [details] Files 3.8.6 bug screenshot Still the exact same bug in Gnome 3.8.6 (screenshot attached).
Gnome 3.8.2, I'm sorry.
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.
This issue has been reported on GitLab. https://gitlab.gnome.org/GNOME/nautilus/issues/638 Closing here.