summaryrefslogtreecommitdiff
path: root/gtk/channel-webdav.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2014-02-27 11:10:25 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2014-03-19 15:24:23 +0100
commiteeeb6e27be376e74c1ad02c092d8e27011ee738e (patch)
tree7c11a308d91c64e0971bb4401f01485a942b3921 /gtk/channel-webdav.c
parent382ecfa16f30c2db80a8996f93dacf5a62d7231c (diff)
session: add shared-dir property and option
Allow to specify the shared directory from the command line, or at runtime via properties. (still default to xdg public share, if none specified)
Diffstat (limited to 'gtk/channel-webdav.c')
-rw-r--r--gtk/channel-webdav.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/channel-webdav.c b/gtk/channel-webdav.c
index 28760f5..ffd617e 100644
--- a/gtk/channel-webdav.c
+++ b/gtk/channel-webdav.c
@@ -36,7 +36,11 @@ static PhodavServer* phodav_server_get(SpiceSession *session, gint *port);
*
* The "webdav" channel exports a directory to the guest for file
* manipulation (read/write/copy etc). The underlying protocol is
- * implemented using WebDAV (RFC 4918)
+ * implemented using WebDAV (RFC 4918).
+ *
+ * By default, the shared directory is the one associated with GLib
+ * %G_USER_DIRECTORY_PUBLIC_SHARE. You can specify a different
+ * directory with #SpiceSession #SpiceSession:shared-dir property.
*
* Since: 0.24
*/
@@ -697,7 +701,7 @@ static PhodavServer* webdav_server_new(SpiceSession *session)
g_warn_if_fail(!session->priv->webdav);
- dav = phodav_server_new(0, g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE));
+ dav = phodav_server_new(0, spice_session_get_shared_dir(session));
session->priv->webdav = dav;
for (i = 0; i < sizeof(session->priv->webdav_magic); i++)
session->priv->webdav_magic[i] = g_random_int_range(0, 255);