From a4ff9a5edb043c8245b9f2fc3ebe452272dd3c0d Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Wed, 24 Aug 2016 16:01:03 +0200 Subject: 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 file changed, 7 insertions(+) diff --git a/common/gmountspec.c b/common/gmountspec.c index bde37fa1..50782722 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); -- cgit v1.2.1