[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kcontrol/konq
From: Waldo Bastian <bastian () kde ! org>
Date: 2004-08-01 14:13:01
Message-ID: 20040801141301.5455D9A40 () office ! kde ! org
[Download RAW message or body]
CVS commit by waba:
Create the documents directory if it didn't exist yet. (BR85585)
CCMAIL: 85585-done@bugs.kde.org
M +17 -3 rootopts.cpp 1.118
--- kdebase/kcontrol/konq/rootopts.cpp #1.117:1.118
@@ -275,8 +275,22 @@ void DesktopPathConfig::save()
if ( !newDocumentURL.equals( documentURL, true ) )
{
-// config->writeEntry( "Documents", urDocument->url());
- config->writePathEntry( "Documents", urDocument->url(), true, true );
+ bool pathOk = true;
+ QString path = urDocument->url();
+ if (!QDir(path).exists())
+ {
+ if (!KStandardDirs::makeDir(path))
+ {
+ KMessageBox::sorry(this, KIO::buildErrorString(KIO::ERR_COULD_NOT_MKDIR, path));
+ urDocument->setURL(documentURL.path());
+ pathOk = false;
+ }
+ }
+
+ if (pathOk)
+ {
+ config->writePathEntry( "Documents", path, true, true );
pathChanged = true;
}
+ }
config->sync();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic