GNOME Bugzilla – Bug 323919
file properties dialog should make distinction between directories and files
Last modified: 2021-06-18 15:17:33 UTC
When asking for the properties of a folder, make a distinction between how many files it contains, and how many subdirectories it contains. Example: Contents: X files, X subdirectories, totalling X <file size unit> Other information: Just a moment ago I was copying the contents of two directories in one directory. After I did that, I wanted to check how many files there were in the new dir, and how many there were in the old two dirs together, because I wanted to compare them to make sure if the copying was done alright. I selected the two old dirs and asked for the properties, it said they had less items than the new directory I created. I was confused. After a while, when I compared the file size, I noticed the file size was the same. I figured out that the new directory had the files divided over more subdirectories than the old two dirs, which caused Nautilus to tell me that the new folder had more items.
Thanks for your bug report! I can still verify this with Nautilus 2.13, and it would indeed be nice to have this fixed.
*** Bug 337530 has been marked as a duplicate of this bug. ***
Using 2.20 and still having this issue. Can be very confusing and irritating.
Created attachment 109262 [details] [review] Maintain separate counts for directories and files. Let me know if something's wrong with the patch, I'm a beginner when it comes to GNOME loving.. errr.. hacking ;-)
Hi Pawel, thanks for your patch! it works fine here. Some comments: - please drop the whitespace fixes, as they mess up VCS and make it more difficult to find out the real changes. - I think it's nicer to only show directory count if there's a directory in the selection, instead of showing "0 directories". - I think it's clearer to refer to "subdirectories" instead of directories. Other than this, I think this approach is fine. Christian?
Created attachment 109296 [details] [review] Updated version. Thanks for the review! Corrected patch includes: * removed white space changes * "totalling" is used instead of "with size" when there's more than 1 item to align with current strings As for "(sub)directories" - I kept "directories". I can change it if you insist although I would think that "subdirectories" suggests immediate children only, ie. not the "deep" count of all enclosed directories.
Thanks for the patch, it looks good, though I think we'd need to hear someone from the usability team for subdirectories vs directories. >+ char *dirs_str = NULL; >+ >+ if (dirs_str) { >+ g_free (dirs_str); >+ } Just this nit: vars are not initialized on declaration in the Nautilus codebase. Also, g_free () is NULL-safe, so you can remove the last check.
But then the code won't compile with GCC 4.3.0! See: http://bugzilla.gnome.org/show_bug.cgi?id=528081
Created attachment 109329 [details] [review] Nit included.
Patch looks good to me, let's wait for Christian comment on it.
Sorry for the delay, and thanks for your hard work. The general approach looks fine, but A) The way you compose the strings is not OK. Translators can not change the order of the "... directories, ... files, ..." strings in the UI. Assuming you have a language where you read from right to left, users would read "with size ..., ... files, ... directories". B) You use the term "directory" in the UI. We should use "folder". [I will fix A-B myself when eventually committing, to show you how to resolve A nicely.] However, the actual problem is C) How do we count subfolders and files in a non-confusing way? Assuming you have a layout folder folder/subfolder1/subsubfolder/subsubfile folder/subfolder1/subfile folder/subfolder1/subfile2 folder/subfolder2 folder/file Counting recursively, we have 4 (sub-)folders and 4 files somewhere in the hierarchy but is that really a useful number for the user? Only the direct subfolders "subfolderX" and the children file "file" are directly associated with the folder "folder". All the subfiles and subsubfolders are just inherited from the subfolders. Wouldn't it make sense to just display the number of direct subfolders and files, and add up the file size recursively in the "totalling ..." string? In this example, it would mean: "The folder "folder" contains two subfolders and 1 file, totallying ..."? Regarding inherited folders: For a copy or move operation that merges folders, you can not draw any conclusions by counting up the nested (sub-)folders. Alexander also proposed to specify the number of subfolders in the original bug report. Regarding inherited files: The total number of files nested in the entire hierarchy may be a useful number, but I can not see how this can be integrated in a non-confusing way. Any ideas?
*** Bug 673928 has been marked as a duplicate of this bug. ***
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.