ack...

although it would be nicer to send back a VDAGENTD_FILE_XFER_STATUS_ERROR
to interrupt client whenever xfer message comes in.


On Tue, Apr 1, 2014 at 4:24 PM, Christophe Fergeau <[email protected]>wrote:

> Currently, if no suitable destination directory can be found, the file
> transfer code defaults to using '.' as the destination directory. As this
> is unlikely to work, better to just disable file transfers when we end up
> in such a situation. This currently happens when spawning spice-vdagent
> from gdm where we don't want file transfers to be available anyway.
> ---
>  src/vdagent.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/src/vdagent.c b/src/vdagent.c
> index 3ab2352..50498ef 100644
> --- a/src/vdagent.c
> +++ b/src/vdagent.c
> @@ -275,13 +275,14 @@ reconnect:
>          fx_dir = g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP);
>      else if (!strcmp(fx_dir, "xdg-download"))
>          fx_dir = g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);
> -    if (!fx_dir) {
> +    if (fx_dir) {
> +        vdagent_file_xfers = vdagent_file_xfers_create(client, fx_dir,
> +                                                       fx_open_dir,
> debug);
> +    } else {
>          syslog(LOG_WARNING,
> -               "warning could not get file xfer save dir, using cwd");
> -        fx_dir = ".";
> +               "warning could not get file xfer save dir, file transfers
> will be disabled");
> +        vdagent_file_xfers = NULL;
>      }
> -    vdagent_file_xfers = vdagent_file_xfers_create(client, fx_dir,
> -                                                   fx_open_dir, debug);
>
>      while (client && !quit) {
>          FD_ZERO(&readfds);
> --
> 1.9.0
>
> _______________________________________________
> Spice-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to