$OpenBSD$

stringByDeletingLastPathComponent must not be used with URLs as it
replaces doubles slashes with a single slash, e.g. "mysql://" with
"mysql:/".

--- SOPE/GDLContentStore/GCSFolderManager.m.orig	Fri May  6 17:57:44 2011
+++ SOPE/GDLContentStore/GCSFolderManager.m	Tue May 31 08:43:12 2011
@@ -748,8 +748,10 @@ static NSCharacterSet *asciiAlphaNumericCS  = nil;
   aclTableName = [tableName stringByAppendingString: @"_acl"];
 
   // TBD: fix SQL injection issues
-  baseURL
-    = [[folderInfoLocation absoluteString] stringByDeletingLastPathComponent];
+  baseURL = [folderInfoLocation absoluteString];
+  NSRange range = [baseURL rangeOfString: @"/" options: NSBackwardsSearch];
+  if (range.location != NSNotFound)
+    baseURL = [baseURL substringToIndex: range.location];
   
   sql = [NSString stringWithFormat: @"INSERT INTO %@"
 		  @"        (c_path, c_path1, c_path2, c_path3, c_path4,"
