<div dir="ltr"><div>ack...<br><br></div>although it would be nicer to send back a VDAGENTD_FILE_XFER_STATUS_ERROR to interrupt client whenever xfer message comes in.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Apr 1, 2014 at 4:24 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Currently, if no suitable destination directory can be found, the file<br>
transfer code defaults to using '.' as the destination directory. As this<br>
is unlikely to work, better to just disable file transfers when we end up<br>
in such a situation. This currently happens when spawning spice-vdagent<br>
from gdm where we don't want file transfers to be available anyway.<br>
---<br>
src/vdagent.c | 11 ++++++-----<br>
1 file changed, 6 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/vdagent.c b/src/vdagent.c<br>
index 3ab2352..50498ef 100644<br>
--- a/src/vdagent.c<br>
+++ b/src/vdagent.c<br>
@@ -275,13 +275,14 @@ reconnect:<br>
fx_dir = g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP);<br>
else if (!strcmp(fx_dir, "xdg-download"))<br>
fx_dir = g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);<br>
- if (!fx_dir) {<br>
+ if (fx_dir) {<br>
+ vdagent_file_xfers = vdagent_file_xfers_create(client, fx_dir,<br>
+ fx_open_dir, debug);<br>
+ } else {<br>
syslog(LOG_WARNING,<br>
- "warning could not get file xfer save dir, using cwd");<br>
- fx_dir = ".";<br>
+ "warning could not get file xfer save dir, file transfers will be disabled");<br>
+ vdagent_file_xfers = NULL;<br>
}<br>
- vdagent_file_xfers = vdagent_file_xfers_create(client, fx_dir,<br>
- fx_open_dir, debug);<br>
<br>
while (client && !quit) {<br>
FD_ZERO(&readfds);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.0<br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Marc-André Lureau
</div>