-rw-r--r-- | core/launcher/launcher.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index d1df4cc..f9c6c02 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -554,12 +554,14 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: | |||
554 | int stamp = uidgen.generate(); | 554 | int stamp = uidgen.generate(); |
555 | 555 | ||
556 | QString newStamp = QString::number( stamp ); // generates newtime Stamp | 556 | QString newStamp = QString::number( stamp ); // generates newtime Stamp |
557 | StorageInfo storage; | 557 | StorageInfo storage; |
558 | const QList<FileSystem> &fileSystems = storage.fileSystems(); | 558 | const QList<FileSystem> &fileSystems = storage.fileSystems(); |
559 | QListIterator<FileSystem> it ( fileSystems ); | 559 | QListIterator<FileSystem> it ( fileSystems ); |
560 | |||
561 | |||
560 | for ( ; it.current(); ++it ) { | 562 | for ( ; it.current(); ++it ) { |
561 | if ( (*it)->isRemovable() ) { // let's find out if we should search on it | 563 | if ( (*it)->isRemovable() ) { // let's find out if we should search on it |
562 | qWarning("%s is removeable", (*it)->path().latin1() ); | 564 | qWarning("%s is removeable", (*it)->path().latin1() ); |
563 | OConfig cfg( (*it)->path() + "/.opiestorage.cf"); | 565 | OConfig cfg( (*it)->path() + "/.opiestorage.cf"); |
564 | cfg.setGroup("main"); | 566 | cfg.setGroup("main"); |
565 | QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); | 567 | QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); |
@@ -570,18 +572,22 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: | |||
570 | QStringList mimetypes = configToMime( &cfg); | 572 | QStringList mimetypes = configToMime( &cfg); |
571 | tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") ); | 573 | tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") ); |
572 | docsFolder->appendFrom( *tmp ); | 574 | docsFolder->appendFrom( *tmp ); |
573 | delete tmp; | 575 | delete tmp; |
574 | 576 | ||
575 | }else{ // come up with the gui cause this a new card | 577 | }else{ // come up with the gui cause this a new card |
576 | MediumMountGui medium((*it)->path() ); | 578 | MediumMountGui medium(&cfg, (*it)->path() ); |
577 | if( medium.check() ){ // we did not ask before or ask again is off | 579 | if( medium.check() ){ // we did not ask before or ask again is off |
578 | if( medium.exec() ){ // he clicked yes so search it | 580 | if( medium.exec() ){ // he clicked yes so search it |
579 | // speicher | 581 | // speicher |
580 | cfg.read(); // cause of a race we need to reread | 582 | //cfg.read(); // cause of a race we need to reread - fixed |
581 | cfg.writeEntry("timestamp", newStamp ); | 583 | cfg.writeEntry("timestamp", newStamp ); |
584 | cfg.write(); | ||
585 | tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) ); | ||
586 | docsFolder->appendFrom( *tmp ); | ||
587 | delete tmp; | ||
582 | }// no else | 588 | }// no else |
583 | }else{ // we checked | 589 | }else{ // we checked |
584 | // do something different see what we need to do | 590 | // do something different see what we need to do |
585 | // let's see if we should check the device | 591 | // let's see if we should check the device |
586 | cfg.setGroup("main" ); | 592 | cfg.setGroup("main" ); |
587 | bool check = cfg.readBoolEntry("autocheck", true ); | 593 | bool check = cfg.readBoolEntry("autocheck", true ); |