Respond to folder creation at specific creation path on macOS

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-02-13 19:45:16 +01:00
parent 30ce2eab02
commit 69d73d1333

View File

@ -458,7 +458,9 @@ void AccountSettings::slotOpenMakeFolderDialog()
#ifdef Q_OS_MAC
// The macOS FolderWatcher cannot detect file and folder changes made by the watching process -- us.
// So we need to manually invoke the slot that is called by watched folder changes.
connect(folderCreationDialog, &QDialog::finished, this, [folder, fileName] { folder->slotWatchedPathChanged(fileName, Folder::ChangeReason::Other); });
connect(folderCreationDialog, &FolderCreationDialog::folderCreated, this, [folder, fileName](const QString &fullFolderPath) {
folder->slotWatchedPathChanged(fullFolderPath, Folder::ChangeReason::Other);
});
#endif
}
}