diff options
author | Rahul Verma <rv404674@gmail.com> | 2018-03-21 15:05:14 +0530 |
---|---|---|
committer | Rahul Verma <rv404674@gmail.com> | 2018-03-21 15:05:14 +0530 |
commit | c48d2de6722949b745f90f7f78fe66062e2cab28 (patch) | |
tree | b6ea8f7b56ee5141b818500c81267e1ea533ada0 | |
parent | f88a61c6b639abd6e3ebf3ee58e95559c5720acf (diff) | |
download | nautilus-c48d2de6722949b745f90f7f78fe66062e2cab28.tar.gz |
nautilus-application: Error out if "x-nautilus-search" is entered from CLI
The problem is that upon entering "x-nautilus-search" in cli a crash is observed.
The solution is to explicitly check for "x-nautilus-search" in cli and error out before even opening the uri.
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/237
-rw-r--r-- | src/nautilus-application.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c index 202ba1322..915a1e9d9 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -984,7 +984,20 @@ nautilus_application_handle_file_args (NautilusApplication *self, file = g_file_new_for_commandline_arg_and_cwd (remaining[idx], cwd); g_free (cwd); } - g_ptr_array_add (file_array, file); + + if (nautilus_is_search_directory (file)) + { + g_autofree char *error_string = NULL; + error_string = g_strdup_printf (_("ā%sā is an internal protocol. " + "Opening this location directly is not supported."), + EEL_SEARCH_URI); + + g_printerr ("%s\n", error_string); + } + else + { + g_ptr_array_add (file_array, file); + } } } else if (g_variant_dict_contains (options, "new-window")) |