From 481d8d3a0bcd26a3fd2b0d4fc6fb009260092bb1 Mon Sep 17 00:00:00 2001 From: Camila San Date: Mon, 30 Sep 2019 20:33:51 +0200 Subject: [PATCH] Checks if exclude file is empty before creating the regular expressions. The default file created by the application it is not empty. Signed-off-by: Camila San --- src/csync/csync_exclude.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp index 32b88616ce..1bb66b15d3 100644 --- a/src/csync/csync_exclude.cpp +++ b/src/csync/csync_exclude.cpp @@ -322,7 +322,11 @@ bool ExcludedFiles::loadExcludeFile(const QByteArray & basePath, const QString & csync_exclude_expand_escapes(line); _allExcludes[basePath].append(line); } - prepare(basePath); + + // nothing to prepare if the user decided to not exclude anything + if(_allExcludes.size()) + prepare(basePath); + return true; }