Index: gio/gdummyfile.c
===================================================================
--- gio/gdummyfile.c	(revision 6861)
+++ gio/gdummyfile.c	(working copy)
@@ -169,12 +169,18 @@
   GDummyFile *dummy = G_DUMMY_FILE (file);
   GFile *parent;
   char *dirname;
+  char *base;
   char *uri;
   GDecodedUri new_decoded_uri;
 
   if (dummy->decoded_uri == NULL)
     return NULL;
 
+  base = strrchr (dummy->decoded_uri->path, '/');
+  if (base == NULL ||
+      *(base+1) == 0)
+    return NULL;
+
   dirname = g_path_get_dirname (dummy->decoded_uri->path);
   
   if (strcmp (dirname, ".") == 0)
