Created attachment 3956 Patch to fix simple_parse_line in xfce-rc-simple.c to handle multiple ] characters in a line. When the line variable of simple_parse_line has a ']' delimiter in it, simple_parse_line returns everything up to that point. This patch makes it so everything up to the last ']' is returned. Fixes a bug in xfdesktop where filenames have a ] in them (such as file[1].c).
What kind of keys are not parsed exactly? If the key says "Value=file[1].c" in the text file?
Sorry, I didn't include the link to the bug in xfdesktop: https://bugzilla.xfce.org/show_bug.cgi?id=2975 Basically xfdesktop uses xfce4util to create an rc file usually located at ~/.config/xfce4/desktop/icons.screen#.rc In that file it stores the filename as the group name and the icon's position as values of that. The way xfce4util is currently written, it will return the after the first ] is located, but that will fail if the filename is something like file[1].c since the rc file will be: [file[1].c] row=8 col=11 Which means simple_parse_line would return "file[1" and not correctly match the entry. The patch I created fixes it to grab the last ] and ignore any text after that, in the event there's a comment embedded at the end of the line. Hopefully, this helps clarify things. If you need me to clean up the patch or need more info, let me know.
http://git.xfce.org/xfce/xfdesktop/tree/src/xfdesktop-file-icon-manager.c 1783:xfdesktop_file_icon_manager_get_cached_icon_position calls if(xfce_rc_has_group(rcfile, name)) http://git.xfce.org/xfce/libxfce4util/tree/libxfce4util/xfce-rc.c xfce-rc.c:407:xfce_rc_has_group (const XfceRc *rc, const gchar *group) calls _xfce_rc_config_has_group http://git.xfce.org/xfce/libxfce4util/tree/libxfce4util/xfce-rc-config.c xfce-rc-config.c:331:_xfce_rc_config_has_group (const XfceRc *rc, calls _xfce_rc_simple_has_group http://git.xfce.org/xfce/libxfce4util/tree/libxfce4util/xfce-rc-simple.c xfce-rc-simple.c:928:_xfce_rc_simple_has_group (const XfceRc *rc and we get to xfce-rc-simple.c:667: if (!simple_parse_line (line, §ion, &key, &value, &locale)) Where the bug prevents xfce_rc_has_group from returning true because xfce-rc-simple.c:330: for (q = ++p; *q != '\0' && *q != ']'; ++q) stops at the first ']' rather than the last in the line. So it's the group name and not a key=value pair.
Fixed in 97f0ec4.