Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/cmd/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cstdlib>
#include <iostream>
#include <qcoreapplication.h>

Check failure on line 9 in src/cmd/cmd.cpp

View workflow job for this annotation

GitHub Actions / build

src/cmd/cmd.cpp:9:10 [clang-diagnostic-error]

'qcoreapplication.h' file not found
#include <QStringList>
#include <QUrl>
#include <QFile>
Expand Down Expand Up @@ -292,7 +292,7 @@
}
}

int main(int argc, char **argv)

Check warning on line 295 in src/cmd/cmd.cpp

View workflow job for this annotation

GitHub Actions / build

src/cmd/cmd.cpp:295:5 [readability-function-cognitive-complexity]

function 'main' has cognitive complexity of 42 (threshold 25)
{
#ifdef Q_OS_WIN
SetDllDirectory(L"");
Expand Down Expand Up @@ -547,6 +547,15 @@

// Always try to load the user-provided exclude list if one is specified
if (hasUserExcludeFile) {
if (!QFile::exists(options.exclude)) {
// A user-supplied --exclude path that can't be found is a
// configuration error, not something to silently ignore:
// reloadExcludeFiles() below drops missing files without
// failing, which previously made the whole sync run with
// no exclusions and no diagnostic (see nextcloud/desktop#4621).
qFatal("Exclude list file supplied via --exclude does not exist: %s", qUtf8Printable(options.exclude));
return EXIT_FAILURE;
}
engine.excludedFiles().addExcludeFilePath(options.exclude);
}
// Load the system list if available, or if there's no user-provided list
Expand Down
1 change: 1 addition & 0 deletions src/csync/csync_exclude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
*/

#include "config_csync.h"

Check failure on line 10 in src/csync/csync_exclude.cpp

View workflow job for this annotation

GitHub Actions / build

src/csync/csync_exclude.cpp:10:10 [clang-diagnostic-error]

'config_csync.h' file not found
#include <qglobal.h>

#ifndef _GNU_SOURCE
Expand Down Expand Up @@ -346,6 +346,7 @@
const auto &excludeFile = *excludeFileIt;
QFile file(excludeFile);
if (!file.exists()) {
qWarning() << "Exclude list file does not exist, skipping:" << excludeFile;
excludeFileIt = excludeFiles.erase(excludeFileIt);
continue;
}
Expand Down
Loading