Fix bug causing PloverPackageSet to treat '' and 'file:/' as distinct root URIs
authorJ. Ali Harlow <ali@juiblex.co.uk>
Fri Jun 08 12:14:49 2018 +0100 (2018-06-08)
changeset 74a69a7f215b92
parent 73 2ba231a7973e
child 75 6575679d2e8e
Fix bug causing PloverPackageSet to treat '' and 'file:/' as distinct root URIs
plover/packageset.c
     1.1 --- a/plover/packageset.c	Thu Jun 07 15:56:09 2018 +0100
     1.2 +++ b/plover/packageset.c	Fri Jun 08 12:14:49 2018 +0100
     1.3 @@ -131,6 +131,8 @@
     1.4      g_return_val_if_fail(PLOVER_IS_PACKAGE_SET(set),FALSE);
     1.5      g_return_val_if_fail(plover__uri_validate(root_uri),FALSE);
     1.6      priv=PLOVER_PACKAGE_SET_GET_PRIVATE(set);
     1.7 +    if (!root_uri || !*root_uri)
     1.8 +	root_uri="file:/";
     1.9      /*
    1.10       * If we're opening a different root_uri, then we can simply open the
    1.11       * new root first and then close the old root if we're successful.