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

Marc-André Lureau mlureau at redhat.com
Fri Jan 23 07:31:12 PST 2015


Hi

----- Original Message -----
> 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.

I think it's a better choice, it'd need to make sure not to start the webdav server when there are no shared dir though.



More information about the Spice-devel mailing list