summaryrefslogtreecommitdiffstats
path: root/khelpcenter/kcmhelpcenter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'khelpcenter/kcmhelpcenter.cpp')
-rw-r--r--khelpcenter/kcmhelpcenter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp
index c3b3e3094..aadce700a 100644
--- a/khelpcenter/kcmhelpcenter.cpp
+++ b/khelpcenter/kcmhelpcenter.cpp
@@ -321,6 +321,7 @@ bool KCMHelpCenter::save()
void KCMHelpCenter::load()
{
+ findWriteableIndexDir();
mIndexDirLabel->setText( Prefs::indexDirectory() );
mListView->clear();
@@ -675,6 +676,12 @@ void KCMHelpCenter::checkSelection()
enableButtonOK( count != 0 );
}
+void KCMHelpCenter::findWriteableIndexDir()
+{
+ TQFileInfo currentDir( Prefs::indexDirectory() );
+ if ( !currentDir.isWritable() )
+ Prefs::setIndexDirectory( KGlobal::dirs()->saveLocation("data", "khelpcenter/index/") );
+}
#include "kcmhelpcenter.moc"
// vim:ts=2:sw=2:et