Index: file-chooser/gtkfilesystemgnomevfs.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/file-chooser/gtkfilesystemgnomevfs.c,v
retrieving revision 1.77
diff -u -p -r1.77 gtkfilesystemgnomevfs.c
--- file-chooser/gtkfilesystemgnomevfs.c	9 Feb 2006 01:58:05 -0000	1.77
+++ file-chooser/gtkfilesystemgnomevfs.c	17 Mar 2006 16:58:59 -0000
@@ -744,6 +744,29 @@ load_afs_dir (GtkFileFolderGnomeVFS *fol
     }
 }
 
+
+static gboolean
+uri_is_hostname_with_trailing_slash (const char *uri)
+{
+  char *p;
+
+  p = strstr (uri, "://");
+  if (p == NULL)
+    {
+      return FALSE;
+    }
+
+  p+=3;
+
+  p = strstr (p, "/");
+  if (p != NULL && *(p + 1) == '\0')
+    {
+      return TRUE;
+    }
+
+  return FALSE;
+}
+
 static char *
 make_uri_canonical (const char *uri)
 {
@@ -752,12 +775,14 @@ make_uri_canonical (const char *uri)
   
   canonical = gnome_vfs_make_uri_canonical (uri);
 
-  /* Strip terminating / unless its foo:/ or foo:/// */
+  /* Strip terminating / unless its foo:/ or foo:///,
+   * or foo://bar/ */
   len = strlen (canonical);
   if (len > 2 &&
       canonical[len-1] == '/' &&
       canonical[len-2] != '/' &&
-      canonical[len-2] != ':')
+      canonical[len-2] != ':' &&
+      !uri_is_hostname_with_trailing_slash (canonical))
     {
       canonical[len-1] = 0;
     }
