author | alwin <alwin> | 2004-02-24 02:47:03 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-24 02:47:03 (UTC) |
commit | f196130d43642f2397ddadeed72e3ea062cda281 (patch) (unidiff) | |
tree | 1916d2e66a8ea4fb149397b71888057c62156091 | |
parent | 4baf741237a4c4575b3efe0bff6c4e143902b7ec (diff) | |
download | opie-f196130d43642f2397ddadeed72e3ea062cda281.zip opie-f196130d43642f2397ddadeed72e3ea062cda281.tar.gz opie-f196130d43642f2397ddadeed72e3ea062cda281.tar.bz2 |
- check now for the storage media flag "check =" in DocumentListPrivate::appendDocpath
- fixed a possible segmentation fault in DocumentListPrivate::nextFile
-rw-r--r-- | core/launcher/documentlist.cpp | 7 |
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 | |||
@@ -440,8 +440,12 @@ void DocumentListPrivate::appendDocpath(FileSystem*fs) | |||
440 | return; | 440 | return; |
441 | } | 441 | } |
442 | } | 442 | } |
443 | Config conf(f.filePath(), Config::File ); | 443 | Config conf(f.filePath(), Config::File ); |
444 | conf.setGroup("main"); | ||
445 | if (!conf.readBoolEntry("check",false)) { | ||
446 | return; | ||
447 | } | ||
444 | conf.setGroup("subdirs"); | 448 | conf.setGroup("subdirs"); |
445 | bool read_all = conf.readBoolEntry("wholemedia",true); | 449 | bool read_all = conf.readBoolEntry("wholemedia",true); |
446 | if (read_all) { | 450 | if (read_all) { |
447 | docPaths+=fs->path(); | 451 | docPaths+=fs->path(); |
@@ -559,8 +563,11 @@ const QString DocumentListPrivate::nextFile() | |||
559 | } | 563 | } |
560 | } | 564 | } |
561 | 565 | ||
562 | const QFileInfoList *fil = lists[searchDepth]; | 566 | const QFileInfoList *fil = lists[searchDepth]; |
567 | if (!fil) { | ||
568 | return QString::null; | ||
569 | } | ||
563 | QFileInfoList *fl = (QFileInfoList *)fil; | 570 | QFileInfoList *fl = (QFileInfoList *)fil; |
564 | unsigned int pos = listPositions[searchDepth]; | 571 | unsigned int pos = listPositions[searchDepth]; |
565 | 572 | ||
566 | if ( pos >= fl->count() ) { | 573 | if ( pos >= fl->count() ) { |