mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
vfs: Fix return value of get_supported_uri_schemes()
The function is expected to return a %NULL-terminated array, but
commit 375b4ca65c
dropped the sentinel when adding support for
additional custom schemes. Add it back.
https://bugzilla.gnome.org/show_bug.cgi?id=768119
This commit is contained in:
parent
e57355b055
commit
a42bdecf5c
@ -295,6 +295,8 @@ g_vfs_get_supported_uri_schemes (GVfs *vfs)
|
||||
|
||||
g_rw_lock_reader_unlock (&additional_schemes_lock);
|
||||
|
||||
g_ptr_array_add (supported_schemes, NULL);
|
||||
|
||||
g_free (priv->supported_schemes);
|
||||
priv->supported_schemes =
|
||||
(char const **) g_ptr_array_free (supported_schemes, FALSE);
|
||||
|
@ -63,6 +63,9 @@ test_register_scheme (void)
|
||||
g_assert_nonnull (vfs);
|
||||
g_assert_true (g_vfs_is_active (vfs));
|
||||
|
||||
schemes = g_vfs_get_supported_uri_schemes (vfs);
|
||||
g_assert_false (g_strv_contains (schemes, "test"));
|
||||
|
||||
res = g_vfs_unregister_uri_scheme (vfs, "test");
|
||||
g_assert_false (res);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user