diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-01 02:39:26 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-01 02:39:26 +0000 |
commit | c800a9a4f2d38c34bb70f8939ec4b3000ea53e22 (patch) | |
tree | 3d2a92cdcd5164ef2f8b5919996193e29ab4c77d | |
parent | e34b0b5c7276f7a3ef82a54d8cf7f68431c84137 (diff) | |
download | glib-c800a9a4f2d38c34bb70f8939ec4b3000ea53e22.tar.gz |
Bug 528600 – g_dummy_file_get_parent("scheme://example.com/")
* gdummyfile.c (g_dummy_file_get_parent): Return NULL if there
is no parent. (Owen Taylor, patch by Christian Neumair)
svn path=/branches/glib-2-16/; revision=7119
-rw-r--r-- | gio/ChangeLog | 9 | ||||
-rw-r--r-- | gio/gdummyfile.c | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gio/ChangeLog b/gio/ChangeLog index d1b07239f..194d48c4e 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -2,6 +2,15 @@ Backported from trunk: + Bug 528600 – g_dummy_file_get_parent("scheme://example.com/") + + * gdummyfile.c (g_dummy_file_get_parent): Return NULL if there + is no parent. (Owen Taylor, patch by Christian Neumair) + +2008-06-30 Matthias Clasen <mclasen@redhat.com> + + Backported from trunk: + * gfile.c (g_file_replace_contents): do not leak the output stream. 2008-06-30 Matthias Clasen <mclasen@redhat.com> diff --git a/gio/gdummyfile.c b/gio/gdummyfile.c index 2287674db..1fa0aeda9 100644 --- a/gio/gdummyfile.c +++ b/gio/gdummyfile.c @@ -172,7 +172,8 @@ g_dummy_file_get_parent (GFile *file) char *uri; GDecodedUri new_decoded_uri; - if (dummy->decoded_uri == NULL) + if (dummy->decoded_uri == NULL || + g_strcmp0 (dummy->decoded_uri->path, "/") == 0) return NULL; dirname = g_path_get_dirname (dummy->decoded_uri->path); |