summaryrefslogtreecommitdiff
path: root/common/gmountspec.c
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2016-08-24 16:01:03 +0200
committerOndrej Holy <oholy@redhat.com>2016-08-29 16:13:05 +0200
commita4ff9a5edb043c8245b9f2fc3ebe452272dd3c0d (patch)
tree7a1e97ec1e445023b3fa9ea3d21706760a5612bc /common/gmountspec.c
parent6d5327037c24d1e3dd13b925dd036fa25986bd62 (diff)
downloadgvfs-a4ff9a5edb043c8245b9f2fc3ebe452272dd3c0d.tar.gz
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
Diffstat (limited to 'common/gmountspec.c')
-rw-r--r--common/gmountspec.c7
1 files changed, 7 insertions, 0 deletions
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);