feat(gui/macOS): Do not send ignore list if it is just empty

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2025-05-12 13:23:34 +08:00 committed by Matthieu Gallien
parent e2a6ea518b
commit 4186750188

View File

@ -251,6 +251,10 @@ void FileProviderSocketController::sendIgnoreList() const
ExcludedFiles ignoreList;
ConfigFile::setupDefaultExcludeFilePaths(ignoreList);
const auto patterns = ignoreList.activeExcludePatterns();
if (patterns.isEmpty()) {
qCWarning(lcFileProviderSocketController) << "No active ignore list patterns, not sending.";
return;
}
const auto message = QString(QStringLiteral("IGNORE_LIST:") + patterns.join('\n'));
sendMessage(message);
}