summaryrefslogtreecommitdiff
path: root/gio/gdummyfile.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2008-06-10 15:27:39 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-06-10 15:27:39 +0000
commit946b78006b14d58c3bdd32454f7ac6227950c4c3 (patch)
treec7d5be5ebaca560501f4310c27e57a4545eb036b /gio/gdummyfile.c
parenta52a14e4a9ee105663ae50e2c9cc0d8905fc1109 (diff)
downloadglib-946b78006b14d58c3bdd32454f7ac6227950c4c3.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 Persch) svn path=/trunk/; revision=6987
Diffstat (limited to 'gio/gdummyfile.c')
-rw-r--r--gio/gdummyfile.c3
1 files changed, 2 insertions, 1 deletions
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);