GNOME Bugzilla – Bug 457936
Directory names with '#' character confuse gthumb
Last modified: 2007-07-19 14:16:56 UTC
Please describe the problem: When gThumb directed to rotate an image placed in a directory, whose name has a '#' character, it does not perform rotation of an original image. Instead, the rotated image is saved in a parent directory with a file name equal to a part of its directory name before '#'. Steps to reproduce: 1. Create a directory with # character (/home/username/picture#1) and place an image into that directory. 2. Browse to that directory with gThumb and try to rotate an image. Actual results: Original image remains non-rotated and file named 'picture' holding rotated image is created in a parent directory (/home/username). Expected results: Rotate an original image. Does this happen every time? yes Other information:
Created attachment 91972 [details] [review] At apply_transformation_jpeg, escape the path for moving. This only happens with jpeg images. The problem is that the # is a special gnomevfs character.
Manuel, Is that the right place for escaping? Or should escaping be added to the underlying function (xfer_file)? - Mike
For doing the escaping there, all calls have to be rechecked. Because, at least in move_to_catalog_dir__ok_cb, escaped paths are passed to file_move funtion.
To be honest, I'm pretty confused about what is escaped and what isn't. Is there an easy way to tell? - Mike
In other words... I'm a little confused why the rotation file has unescaped uris. I'm looking into that. - Mike
I don't know if i am understanding. In apply_transformation_jpeg, the jpegtran needs unescaped paths. And the gnomevfs functions need escaped paths because some characters have special meanings. But you are right, this is confusing.
Anyway, I've committed the patch (svn rev 1807, should appear in 2.10.6). Thanks! I guess that gvfs is supposed to replace gnome-vfs and make URI handling much easier. I hope it's ready soon... - Mike