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 587806 - The file selector should honor .hidden files
The file selector should honor .hidden files
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.20.x
Other All
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
: 596234 629870 (view as bug list)
Depends on:
Blocks: 689584 689585
 
 
Reported: 2009-07-05 10:49 UTC by Jerry Casiano
Modified: 2013-04-27 22:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
[PATCH] glocalfile: Support for .hidden files (3.39 KB, patch)
2009-11-22 19:42 UTC, Allison Karlitskaya (desrt)
none Details | Review
Support for .hidden files (4.10 KB, patch)
2012-11-29 00:04 UTC, Timothy Arceri
committed Details | Review

Description Jerry Casiano 2009-07-05 10:49:51 UTC
Please describe the problem:
In Nautilus it is possible to hide files and folders by listing the files in a
.hidden file in the directory where they reside.  This feature is very useful
for sysadmins that want to reduce information overflow for ordinary users, by
only show files and folders on a need to know basis. 

The problem is that the hidden files are still listed in file dialogs. Here the
problem with too much information is even bigger than in Nautilus windows as the
file dialog often is smaller, and the chance that the user have to resort to
time consuming scrolling to find the file he needs is higher.

So please support hiding of files listed in the .hidden filein file selection
dialogs as well as in Nautilus windows.

BTW: .hidden files is also by MacOS-X. Supporting the .hidden file would
increase the compatiblility with filesystems exported from MacOS-X.


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
This is a clone of 

http://bugzilla.gnome.org/show_bug.cgi?id=314280

which was closed as obsolete...  :-(

Unfortunately this issue is still present for me.
Comment 1 Allison Karlitskaya (desrt) 2009-11-22 19:42:14 UTC
Created attachment 148290 [details] [review]
[PATCH] glocalfile: Support for .hidden files

this adds code to check the '.hidden' file and sets the standard::is-hidden property for local files
Comment 2 Alexander Larsson 2009-11-23 15:12:19 UTC
I don't like the dependency on the mainloop to free the cache.
That won't work for e.g. commandline apps.
We should probably invalidate old caches in the file_is_hidden() call too (at least some times).
Comment 3 Alexander Larsson 2009-11-23 15:21:55 UTC
Also, of the readdir() case we should use GLocalParentFileInfo to avoid looking up the .hidden cache all the time
Comment 4 Matthias Clasen 2010-10-15 18:01:26 UTC
*** Bug 629870 has been marked as a duplicate of this bug. ***
Comment 5 Allison Karlitskaya (desrt) 2012-01-19 03:44:04 UTC
This could potentially make use of glib's worker thread somehow...
Comment 6 Allison Karlitskaya (desrt) 2012-11-26 14:47:42 UTC
*** Bug 596234 has been marked as a duplicate of this bug. ***
Comment 7 Timothy Arceri 2012-11-29 00:04:57 UTC
Created attachment 230138 [details] [review]
Support for .hidden files

This patch is just Ryans patch adapted to use Glibs internal worker thread rather than the using the mainloop.

I'm not sure I understand Alexanders other comments. I'm not sure what logic should be used to decided to invalidate old caches in file_is_hidden() rather than using the thread.
And I'm not sure what he means by the readdir() case.
Comment 8 Allison Karlitskaya (desrt) 2012-11-29 01:51:00 UTC
This patch looks just right.  I think it addresses Alex's concern about non-mainloop apps.

I'm not sure what he meant by the readdir() comment.

As far as I'm concerned this could go in now (assuming you've tested it).  I'd like to wait for Alex's review first, though.
Comment 9 Timothy Arceri 2012-12-03 05:30:01 UTC
Just noticed your comment looks like I forgot to cc myself.

Yes I've tested the patch with a small .hidden file. Haven't done any testing with large list but I would assume its should work ok.
Comment 10 Alexander Larsson 2012-12-05 12:46:52 UTC
What i mean by the readdir case is GLocalFileEnumerator enumerating an entire directory, wanting is_hidden info for each file. When getting the information for each child in the directory there is some data that depends on information from the parent directory. Like say if its sticky, etc. Instead of reading this for every file we do it once in _g_local_file_info_get_parent_info () which we pass into _g_local_file_info_get().

I'm just saying that it would perhaps be nice to look up the hidden cache once for the parent dir and then just pass it via the parent info to all info_get() call rather than constructing the parent dir and looking it up for each file.
Comment 11 Alexander Larsson 2012-12-06 21:15:45 UTC
Anyway, that is not so important. The patch looks good as is.
Comment 12 David Zeuthen (not reading bugmail) 2012-12-06 21:23:59 UTC
Comment on attachment 230138 [details] [review]
Support for .hidden files

Committed this to master after talking to Alex on IRC since the patch in bug 689800 is related.

http://git.gnome.org/browse/glib/commit/?id=510ba9b4efe1813e24c6dfa7405c3547bf9efdd7
Comment 13 Colin Walters 2013-01-11 16:15:09 UTC
Note, follow up patch in https://bugzilla.gnome.org/show_bug.cgi?id=691558
Comment 14 Jerry Casiano 2013-04-27 22:45:01 UTC
Thanks. :-)