Skip to content

Commit

Permalink
search: Relax folder restrictions to allow gvfs locations.
Browse files Browse the repository at this point in the history
The real path for gvfs mounts is /run/user/nnnn/gvfs/*, so remove
the /run path from the skip list - in hindsight there may be more
users here than assumed (see Warpinator link).

The zero-size file check was originally intended to catch /proc
files without having to check each folder's filesystem type, but
since we're skipping /proc explicitly, it's not necessary, and
smb folders (and probably others) report 0 size.

Fixes #3273

linuxmint/warpinator@1c502dcd0e590953f7
  • Loading branch information
mtwebster committed Jul 21, 2023
1 parent 5ea25e7 commit 1ae5a6d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions libnemo-private/nemo-search-engine-advanced.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,6 @@ hash_func_check_skip_dir (gpointer key,
static gboolean
should_skip_child (SearchThreadData *data, GFileInfo *info, GFile *file, gboolean is_dir)
{
if (g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE) == 0) {
return TRUE;
}

const gchar *path = g_file_peek_path (file);
g_autofree gchar *resolved_path = realpath (path, NULL);

Expand Down
2 changes: 1 addition & 1 deletion libnemo-private/org.nemo.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@
<summary>Stores the most recent state of the content search case toggle</summary>
</key>
<key name="search-skip-folders" type="as">
<default>['/dev', '/proc', '/run', '/sys', 'dosdevices', '.git']</default>
<default>['/dev', '/proc', '/sys', 'dosdevices', '.git']</default>
<summary>Paths or folder names to never recurse into when searching</summary>
<description>List of locations that the search engine will never enter when looking for matches. These can be absolute or simply folder names (like .git). You can still enter those folders and search inside of them, however.</description>
</key>
Expand Down

0 comments on commit 1ae5a6d

Please sign in to comment.