[nautilus/wip/antoniof/local_vs_native_fixup: 81/90] files-view: Support FUSE paths as script parameters




commit 078603d269e5fb684ed400bb9bb324b16ced9eef
Author: António Fernandes <antoniof gnome org>
Date:   Tue May 12 00:41:36 2020 +0100

    files-view: Support FUSE paths as script parameters
    
    The scripts in the Scripts menu are passed the (possibly relative)
    local paths to selected files as command line parameters.
    
    The relative paths can only work if the current directory itself has a
    local path that we can chdir into, and, for backwards compatibility,
    don't pass URIs.
    
    For that reason we pass no parameters if nautilus_file_is_local()
    returns FALSE for any of them. [1]
    
    However, it returns FALSE for files in FUSE mounts, which have
    perfectly usable local paths.
    
    So, use nautilus_file_is_local_or_fuse() instead.

 src/nautilus-files-view.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index a36209073..b5784d183 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -5143,7 +5143,7 @@ get_file_names_as_parameter_array (GList             *selection,
     {
         file = NAUTILUS_FILE (node->data);
 
-        if (!nautilus_file_is_local (file))
+        if (!nautilus_file_is_local_or_fuse (file))
         {
             parameters[i] = NULL;
             g_strfreev (parameters);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]