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 323919 - file properties dialog should make distinction between directories and files
file properties dialog should make distinction between directories and files
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Properties Dialog
2.22.x
Other All
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 337530 673928 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-12 19:56 UTC by Alexander van Loon
Modified: 2021-06-18 15:17 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Maintain separate counts for directories and files. (3.54 KB, patch)
2008-04-14 20:25 UTC, Paweł Paprota
none Details | Review
Updated version. (3.27 KB, patch)
2008-04-15 11:52 UTC, Paweł Paprota
reviewed Details | Review
Nit included. (3.26 KB, patch)
2008-04-15 18:37 UTC, Paweł Paprota
rejected Details | Review

Description Alexander van Loon 2005-12-12 19:56:08 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.
Comment 1 Christian Neumair 2005-12-21 22:49:17 UTC
Thanks for your bug report!
I can still verify this with Nautilus 2.13, and it would indeed be nice to have this fixed.
Comment 2 Teppo Turtiainen 2007-01-20 12:35:36 UTC
*** Bug 337530 has been marked as a duplicate of this bug. ***
Comment 3 ianaré 2008-03-13 20:54:28 UTC
Using 2.20 and still having this issue. Can be very confusing and irritating.
Comment 4 Paweł Paprota 2008-04-14 20:25:10 UTC
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 ;-)
Comment 5 Cosimo Cecchi 2008-04-15 09:25:27 UTC
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?
Comment 6 Paweł Paprota 2008-04-15 11:52:59 UTC
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.
Comment 7 Cosimo Cecchi 2008-04-15 15:16:47 UTC
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.
Comment 8 Paweł Paprota 2008-04-15 15:20:12 UTC
But then the code won't compile with GCC 4.3.0!

See:

http://bugzilla.gnome.org/show_bug.cgi?id=528081
Comment 9 Paweł Paprota 2008-04-15 18:37:17 UTC
Created attachment 109329 [details] [review]
Nit included.
Comment 10 Cosimo Cecchi 2008-04-15 23:14:32 UTC
Patch looks good to me, let's wait for Christian comment on it.
Comment 11 Christian Neumair 2008-05-10 16:20:59 UTC
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?
Comment 12 Cosimo Cecchi 2012-04-11 20:37:43 UTC
*** Bug 673928 has been marked as a duplicate of this bug. ***
Comment 13 André Klapper 2021-06-18 15:17:33 UTC
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.