summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libnautilus-private/nautilus-file-utilities.c10
-rw-r--r--libnautilus-private/nautilus-file-utilities.h1
-rw-r--r--src/nautilus-bookmark-list.c4
3 files changed, 15 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index 952d010ca..e8def7f32 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -35,6 +35,7 @@
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
#include <eel/eel-debug.h>
+#include <eel/eel-vfs-extensions.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
@@ -523,6 +524,15 @@ nautilus_is_desktop_directory (GFile *dir)
return g_file_equal (dir, desktop_dir);
}
+gboolean
+nautilus_is_search_directory (GFile *dir)
+{
+ g_autofree gchar *uri = NULL;
+
+ uri = g_file_get_uri (dir);
+ return eel_uri_is_search (uri);
+}
+
GMount *
nautilus_get_mounted_mount_for_root (GFile *location)
{
diff --git a/libnautilus-private/nautilus-file-utilities.h b/libnautilus-private/nautilus-file-utilities.h
index d3016df09..5e1f2837a 100644
--- a/libnautilus-private/nautilus-file-utilities.h
+++ b/libnautilus-private/nautilus-file-utilities.h
@@ -46,6 +46,7 @@ gboolean nautilus_is_home_directory (GFile *dir);
gboolean nautilus_is_home_directory_file (GFile *dir,
const char *filename);
gboolean nautilus_is_in_system_dir (GFile *location);
+gboolean nautilus_is_search_directory (GFile *dir);
GMount * nautilus_get_mounted_mount_for_root (GFile *location);
gboolean nautilus_should_use_templates_directory (void);
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c
index b62414ab9..e01125427 100644
--- a/src/nautilus-bookmark-list.c
+++ b/src/nautilus-bookmark-list.c
@@ -569,6 +569,10 @@ nautilus_bookmark_list_can_bookmark_location (NautilusBookmarkList *list,
return FALSE;
}
+ if (nautilus_is_search_directory (location)) {
+ return FALSE;
+ }
+
bookmark = nautilus_bookmark_new (location, NULL);
is_builtin = nautilus_bookmark_get_is_builtin (bookmark);
g_object_unref (bookmark);