Skip to content

KConfigGroup: fix writePathEntry/readPathEntry roundtrip for symlinks

David Faure requested to merge work/dfaure/fix_freebsd_roundtrip into master

If $HOME isn't canonical (e.g. on FreeBSD it's /home/user while the canonical path is /usr/home/user), replacing the canonical version of $HOME with $HOME means that we'll read back a different value than we wrote in. It might seem "equivalent" but it leads to surprises like KRecentDocuments showing duplicates because /usr/home/user became /home/user in the KConfig roundtrip (but not in the XBEL roundtrip).

This commit loses the replacement of /usr/home/user with $HOME on FreeBSD, but I think an exact roundtrip is what we expect, rather than stuff being modified under our feet. The alternative would be to canonicalize everything in KRecentDocuments but users don't want to see the /usr in front, I assume (so we would have to use a cache of canonicalized path, for the removal of duplicates, awful performance wise).

Merge request reports