author | zautrix <zautrix> | 2005-03-30 10:41:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-30 10:41:33 (UTC) |
commit | 597cad3a63e6c22855704bf8435db70e3c2b184f (patch) (side-by-side diff) | |
tree | f7093b331be9a52a07d01a6f2f5c1f26daf42d50 /microkde | |
parent | 889d2102fcfe2fb0786b3f8f406dc32b42e38c7a (diff) | |
download | kdepimpi-597cad3a63e6c22855704bf8435db70e3c2b184f.zip kdepimpi-597cad3a63e6c22855704bf8435db70e3c2b184f.tar.gz kdepimpi-597cad3a63e6c22855704bf8435db70e3c2b184f.tar.bz2 |
fix
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index cf0d1ee..810c889 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -1285,32 +1285,42 @@ void KStandardDirs::addKDEDefaults() { QString confFile; #ifdef DESKTOP_VERSION confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; QFileInfo fi ( confFile ); if ( !fi.exists() ) confFile = QDir::homeDirPath() + "/.microkdehome"; else qDebug("Loading path info from " + confFile ); #else confFile = QDir::homeDirPath() + "/.microkdehome"; #endif KConfig cfg ( confFile ); cfg.setGroup("Global"); localKdeDir = cfg.readEntry( "MICROKDEHOME", QDir::homeDirPath() + "/kdepim/" ); +#ifdef DESKTOP_VERSION + if ( localKdeDir.startsWith( "LOCAL:" ) ) { +#ifdef _WIN32_ + localKdeDir = qApp->applicationDirPath () + "\\"+ localKdeDir.mid( 6 ); +#else + localKdeDir = qApp->applicationDirPath () + "/"+ localKdeDir.mid( 6 ); +#endif + qDebug("Using local conf dir %s ",localKdeDir.latin1() ); + } +#endif } } else { // We treat root different to prevent root messing up the // file permissions in the users home directory. localKdeDir = readEnvPath("MICROKDEROOTHOME"); if (!localKdeDir.isEmpty()) { if (localKdeDir.at(localKdeDir.length()-1) != '/') localKdeDir += '/'; } else { //US struct passwd *pw = getpwuid(0); //US localKdeDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.microkde/"; |