Re: Cong VFS

Jeff Martin <[email protected]>
Newsgroups gmane.editors.conglomerate.devel
Message-ID <[email protected]>
Forgot to attach the the changes I've made so far.

On Wed, 2004-10-20 at 11:06 +0100, Jeff Martin wrote:
> I've been fiddling again trying to get conglomerate to work with webdav.
> In theory this should just work but, it don't.
> 
> In cong-vfs.c there's a couple of lines which convert relative uri to to
> absolute by adding file:// to the front. This however knackers things
> starting http://. So I took these lines out. Relative uri still work
> fine so I'm not quite sure why these lines where there (may be an old
> bug work around?) 
> 
> The problem I have now is gnome_vfs_read  returning zero bytes read in
> cong_vfs_read_bytes. I've run a packet sniff and the document is begin
> returned fine from the web server, but never makes it out of
> gnome_vfs_read.
> 
> Can anyone shed some light on things?
> 
-- 
jeff martin
information technologist
mkodo limited

mobile: 44 (0) 78 55 478 331
phone: 44 (0) 20 77 29 45 45
email: [email protected]

www.mkodo.com

73 Leonard St, London, EC2A 4QS. U.K
cong-vfs.txt (text/x-patch, 1 KB)
Index: src/cong-vfs.c
===================================================================
RCS file: /cvs/gnome/conglomerate/src/cong-vfs.c,v
retrieving revision 1.6
diff -u -p -r1.6 cong-vfs.c
--- src/cong-vfs.c	25 Jun 2004 00:33:03 -0000	1.6
+++ src/cong-vfs.c	20 Oct 2004 09:26:31 -0000
@@ -78,20 +78,7 @@ cong_vfs_new_buffer_from_file (const cha
 	g_return_val_if_fail(buffer,GNOME_VFS_ERROR_BAD_PARAMETERS);
 	g_return_val_if_fail(size,GNOME_VFS_ERROR_BAD_PARAMETERS);
 
-	/* it seems that GnomeVFS works with absolute paths, so
-	   if the filename is not absolute, build it.
-	   GnomeVFS URIs are absolute. */
-	   
-	if (!g_path_is_absolute (filename) && !(g_str_has_prefix (filename, "file:"))) {
-
-		gchar *absolute_path = g_strconcat (g_get_current_dir(), GNOME_VFS_URI_PATH_STR, filename, NULL);
-    		uri = gnome_vfs_uri_new (absolute_path);
-		g_free (absolute_path);
-
-	} else {
-
-		uri = gnome_vfs_uri_new (filename);
-	}
+	uri = gnome_vfs_uri_new (filename);
 
 	vfs_result = cong_vfs_new_buffer_from_uri(uri, buffer, size);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.