-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index 7f2a326..1c3e0ae 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -41,8 +41,9 @@ #include <qdict.h> #include <qdir.h> #include <qfileinfo.h> #include <qstring.h> +#include <qmessagebox.h> #include <qapplication.h> #include <qstringlist.h> @@ -1203,20 +1204,24 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode) } static QString readEnvPath(const char *env) { -#ifdef _WIN32_ - return ""; -#else - QCString c_path = getenv(env); - if (c_path.isEmpty()) - return QString::null; - return QFile::decodeName(c_path); -#endif + //#ifdef _WIN32_ + // return ""; + //#else + QCString c_path; + if ( getenv(env) != NULL ) + c_path = QString ( getenv(env) ); + if (c_path.isEmpty()) + return QString::null; + return QFile::decodeName(c_path); + //#endif + } void KStandardDirs::addKDEDefaults() { + //qDebug("ERROR: KStandardDirs::addKDEDefaults() called "); //return; QStringList kdedirList; @@ -1266,10 +1271,16 @@ void KStandardDirs::addKDEDefaults() { localKdeDir = readEnvPath("MICROKDEHOME"); if (!localKdeDir.isEmpty()) { +#ifdef _WIN32_ + if (localKdeDir.at(localKdeDir.length()-1) != '\\') + localKdeDir += '\\'; +#else if (localKdeDir.at(localKdeDir.length()-1) != '/') localKdeDir += '/'; +#endif + //QMessageBox::information( 0,"localKdeDir",localKdeDir, 1 ); } else { localKdeDir = QDir::homeDirPath() + "/kdepim/"; |