Autodetect usage of KDEROOTHOME variable

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1176194 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent ae5384b4bd
commit a1602e0cf6

@ -1320,7 +1320,15 @@ void KStandardDirs::addKDEDefaults()
// We treat root differently to prevent a "su" shell messing up the
// file permissions in the user's home directory.
TQString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
TQString localKdeDir;
if (getuid() == 0) {
localKdeDir = readEnvPath("KDEROOTHOME");
if (localKdeDir.isEmpty() == true)
localKdeDir = readEnvPath("KDEHOME");
}
else {
localKdeDir = readEnvPath("KDEHOME");
}
if (!localKdeDir.isEmpty())
{
if (localKdeDir[localKdeDir.length()-1] != QChar('/'))

Loading…
Cancel
Save