[Nautilus-list] [PATCH] Custom icon patch



Hello,

today I noticed that when I tried to set the custom icon of a directory
by dragging the icon to the sidebar icon of the directory, it wouldn't
work if the icon file contained ,  or .

After a bit of digging I noticed that the code that set the custom icon
metadata didn't escape the uri, so when finally xmlSetProp was called to
set the "custom_icon" property, libxml encoded the extended characters
( in this case) and created extra entity nodes. Then when xmlGetProp
is called, libxml only cares about the text nodes, which resulted in a
file name which wasn't correct. For example, if I set a property by
doing:

xmlSetProp (node, "foo", "abcdef");

and later retrieve it by doing:

str = xmlGetProp (node, "foo");

str will contain the string "abcdef".

The best solution for this is probably to escape the string before
setting metadata, so here's a patch that does that.

//andersca
andersca gnu org






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]