From: Kevin Ottens Date: Mon, 3 Aug 2020 15:09:08 +0000 (+0200) Subject: Make sure we always have a CLSID when Explorer integration is used X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~35 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0516db5e10a2418659342d399d9bb36a0cc01669;p=nextcloud-desktop.git Make sure we always have a CLSID when Explorer integration is used We update properly the CLSID of folders to integrate them with the Explorer pane when they are added or removed from the GUI. That said, there might be cases of users adding folders to sync straight from the GUI. In such a case the CLSID might be missing on config load so now we assign one on the fly when that happens. Signed-off-by: Kevin Ottens --- diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index 2ac7b6d2f..be3a2f1e2 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -945,6 +945,11 @@ Folder *FolderMan::addFolderInternal(FolderDefinition folderDefinition, auto folder = new Folder(folderDefinition, accountState, this); + if (_navigationPaneHelper.showInExplorerNavigationPane() && folderDefinition.navigationPaneClsid.isNull()) { + folder->setNavigationPaneClsid(QUuid::createUuid()); + folder->saveToSettings(); + } + qCInfo(lcFolderMan) << "Adding folder to Folder Map " << folder << folder->alias(); _folderMap[folder->alias()] = folder; if (folder->syncPaused()) {