Skip to content

KStandardDirs: always resolve symlinks for config files

As was investigated by ade, a unit test was failing on FreeBSD where /home is a symlink, because localxdgconfdir() would return the path without resolving symlinks, whereas saveLocation() always resolved symlinks by using the realPath() method.

Make the paths returned by localkdedir, localxdgdatadir and localxdgconfdir more consistent with the way most of KStandardDirs wors by always resolving symlinks (via realPath).

Note that according to;

  • localkdedir is only used in kde-config.cpp (commented out code), and in kdelibs4support/src/kdeui/kglobalsettings.cpp.
  • localxdgdatadir is only used (once) in kstandarddirs itself
  • localxdgconfdir is only used in kstandarddirs and in plasma-workspace/kcms/fonts/kxftconfig.cpp, there is an open MR about porting the latter away from kdelibs4support

Merge request reports