summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index 39dc7c9..63f853e 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -432,24 +432,28 @@ DocumentListPrivate::DocumentListPrivate( ServerInterface *gui )
void DocumentListPrivate::appendDocpath(FileSystem*fs)
{
QDir defPath(fs->path()+"/Documents");
QFileInfo f(fs->path()+"/.opiestorage.cf");
if (!f.exists()) {
Mediadlg dlg(fs);
if (QDialog::Accepted != QPEApplication::execDialog( &dlg )) {
return;
}
}
Config conf(f.filePath(), Config::File );
+ conf.setGroup("main");
+ if (!conf.readBoolEntry("check",false)) {
+ return;
+ }
conf.setGroup("subdirs");
bool read_all = conf.readBoolEntry("wholemedia",true);
if (read_all) {
docPaths+=fs->path();
return;
}
QStringList subDirs = conf.readListEntry("subdirs",':');
if (subDirs.isEmpty()) {
if (defPath.exists()) {
docPaths+=defPath.path();
}
return;
@@ -551,24 +555,27 @@ const QString DocumentListPrivate::nextFile()
// qDebug("now using base path: %s", docPaths[docPathsSearched].latin1() );
docPathsSearched++;
if ( !dir.exists( ".Qtopia-ignore" ) ) {
listDirs[0] = new QDir( dir );
lists[0] = listDirs[0]->entryInfoList();
listPositions[0] = 0;
searchDepth = 0;
}
}
}
const QFileInfoList *fil = lists[searchDepth];
+ if (!fil) {
+ return QString::null;
+ }
QFileInfoList *fl = (QFileInfoList *)fil;
unsigned int pos = listPositions[searchDepth];
if ( pos >= fl->count() ) {
// go up a depth
delete listDirs[searchDepth];
listDirs[searchDepth] = 0;
lists[searchDepth] = 0;
listPositions[searchDepth] = 0;
searchDepth--;
} else {
const QFileInfo *fi = fl->at(pos);