[Spice-devel] [spice-gtk] Make sure default SpiceSession::shared-dir is not NULL

Christophe Fergeau cfergeau at redhat.com
Fri Jan 23 07:05:00 PST 2015


On Fri, Jan 23, 2015 at 09:45:49AM -0500, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
> > Calling spice_session_set_shared_dir() with a NULL argument will trigger
> > a runtime warning. g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE)
> > will return NULL if (for example) ~/.config/user-dirs.dirs is missing,
> > and this is the default value for the "shared-dir" property which is set
> > upon SpiceSession construction. This means we could end up calling
> > spice_session_set_shared_dir() with a NULL parameter when instantiating
> > a SpiceSession instance.
> 
> I would say it is a fine warning. I am not sure we want to hardcode the Public path here.

The alternative is to cope with a NULL public path, which seems to be
fine actually.
Getting a runtime warning when you run remote-viewer in a setup which
does not match exactly the one of the developers, especially when you
don't use a webdav channel is not very nice if we can avoid it.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150123/d2d16b0e/attachment.sig>


More information about the Spice-devel mailing list