Re: ! [PATCH] Use append_file_name instead of append_string in Xfer code
- From: Alexander Larsson <alexl redhat com>
- To: Christian Neumair <chris gnome-de org>
- Cc: gnome-vfs-list gnome org
- Subject: Re: ! [PATCH] Use append_file_name instead of append_string in Xfer code
- Date: Fri, 21 Apr 2006 14:55:24 +0200
On Fri, 2006-04-21 at 13:11 +0200, Christian Neumair wrote:
> Am Donnerstag, den 20.04.2006, 16:53 +0200 schrieb Alexander Larsson:
> > On Fri, 2006-03-24 at 10:54 +0100, Christian Neumair wrote:
> > > While trying to debug a lossy ext3->vfs copy I stumbled across a major
> > > bug which makes copying break for filenames that contain a '#'
> > > character. At least some of the Xfer code formerly used a helper which
> > > made GnomeVFS interpret reserved characters, splitting the filename at
> > > the '#' position, and appending the rest to the fragment ID of the URI.
Actually, the other append_file_name() changes were wrong too, because
progress->progress_info->duplicate_name is already stored in escaped
form.
> > This is wrong, gnome_vfs_uri_append_file_name will escape '/' which is
> > not right in this case. However gnome_vfs_escape_path_string isn't right
> > either, as it doesn't escape '&', '=' and '?'. Given a superficial look
> > this seems bogus though. I can't see any reason for
> > gnome_vfs_escape_path_string to not escape those. It will only cause
> > bugs. Maybe I'm missing something here?
>
> I totally agree. Shouldn't _escape_path_string differ from
> _escape_string in allowing '/'? Do you know why _escape_slashes also
> allows '%'?
It doesn't allow %, it allows any chars in 32-128 but '/', ' ' and '%'.
The '%' is because that is used as the escape char.
I don't see any reason not to escape '?' in paths. Its clearly a special
character in uris, even though gnome-vfs only uses it in very few places
(only in make_full_uri_from_relative, and its special-case-escaped in
set_uri_element). So, I commited that, and the append_path parts of your
patch.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's an ungodly skateboarding barbarian possessed of the uncanny powers of an
insect. She's a virginal mute opera singer who hides her beauty behind a pair
of thick-framed spectacles. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]