mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
FolderMan: Use folderForPath method to get the folder object for a path
This commit is contained in:
parent
c12d3870cd
commit
86e13ea06f
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user