[gvfs] common: Handle mount_prefix by g_mount_spec_set



commit a4ff9a5edb043c8245b9f2fc3ebe452272dd3c0d
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Aug 24 16:01:03 2016 +0200

    common: Handle mount_prefix by g_mount_spec_set
    
    mount_prefix is set to the value "/export" if you e.g. call the following:
    gvfs-mount nfs://localhost/export
    
    Unfortunatelly, it is not possible to execute backend manually with a
    concrete mount_prefix. Handle key "prefix" as mount_prefix, so you can
    now execute backend manually with prefix, e.g.:
    /usr/libexec/gvfsd-nfs host=localhost prefix=/export
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770545

 common/gmountspec.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/common/gmountspec.c b/common/gmountspec.c
index bde37fa..5078272 100644
--- a/common/gmountspec.c
+++ b/common/gmountspec.c
@@ -154,6 +154,13 @@ g_mount_spec_set_with_len_internal (GMountSpec *spec,
   else
     value_copy = (char*) value;
 
+  if (g_str_equal ("prefix", key))
+    {
+      g_mount_spec_set_mount_prefix (spec, value_copy);
+      g_free (value_copy);
+      return;
+    }
+
   for (i = 0; i < spec->items->len; i++)
     {
       GMountSpecItem *item = &g_array_index (spec->items, GMountSpecItem, i);


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