FolderMan: Use folderForPath method to get the folder object for a path

This commit is contained in:
Klaas Freitag 2014-10-24 15:07:33 +02:00
parent c12d3870cd
commit 86e13ea06f

View File

@ -701,11 +701,10 @@ bool FolderMan::startFromScratch( const QString& localFolder )
// Disconnect the socket api from the database to avoid that locking of the
// db file does not allow to move this dir.
if( _socketApi ) {
foreach( Folder *f, _folderMap.values() ) {
if(f) {
if( localFolder.startsWith(f->path()) ) {
_socketApi->slotUnregisterPath(f->alias());
}
Folder *f = folderForPath(localFolder);
if(f) {
if( localFolder.startsWith(f->path()) ) {
_socketApi->slotUnregisterPath(f->alias());
}
}
}