From 86e13ea06fcc0d131b2f3ff44365154f945b960b Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Fri, 24 Oct 2014 15:07:33 +0200 Subject: [PATCH] FolderMan: Use folderForPath method to get the folder object for a path --- src/mirall/folderman.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp index 762fcf8966..5bceae449b 100644 --- a/src/mirall/folderman.cpp +++ b/src/mirall/folderman.cpp @@ -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()); } } }