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




commit e068dbf32efe4fd109c7a6ce61f2bf864e27209a
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 b0ef57dbf..b845245ac 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -5140,7 +5140,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]