[PATCH] Fixes incorrect escaping in webdav module
- From: Yann Rouillard <yann pleiades fr eu org>
- To: gnome-vfs-list gnome org
- Subject: [PATCH] Fixes incorrect escaping in webdav module
- Date: Sun, 21 Oct 2007 18:36:16 +0200
The attached patch fixes a missing escaping bug in the webdav/neon gnomevfs module.
This bug prevented files with special characters in it to be retrieved from a webdav mount.
The corresponding bugzilla issues are http://bugzilla.gnome.org/show_bug.cgi?id=319349 and http://bugzilla.gnome.org/show_bug.cgi?id=166969
Yann
Index: modules/http-neon-method.c
===================================================================
--- modules/http-neon-method.c (révision 5342)
+++ modules/http-neon-method.c (copie de travail)
@@ -1188,7 +1188,7 @@
time_t time;
gulong size;
ne_uri uri;
- char *unesc_path;
+ char *unesc_path, *unesc_ctx_path;
ctx = (PropfindContext *) userdata;
@@ -1205,10 +1205,10 @@
info = gnome_vfs_file_info_new ();
unesc_path = ne_path_unescape (uri.path);
info->name = g_path_get_basename (unesc_path);
- NE_FREE (unesc_path);
+ unesc_ctx_path = ne_path_unescape (ctx->path);
DEBUG_HTTP_2 ("Comparing: \n\t[%s] \n\t[%s]", ctx->path, uri.path);
- if (ne_path_compare (ctx->path, uri.path) == 0) {
+ if (ne_path_compare (unesc_ctx_path, unesc_path) == 0) {
DEBUG_HTTP_3 ("target");
ctx->target = info;
@@ -1225,6 +1225,8 @@
ctx->children = g_list_append (ctx->children, info);
}
+ NE_FREE (unesc_ctx_path);
+ NE_FREE (unesc_path);
ne_uri_free (&uri);
/* getlastmodified */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]