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 <hello@camila.codes>
This commit is contained in:
Camila San 2019-09-30 20:33:51 +02:00
parent a140720901
commit 481d8d3a0b
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4

View file

@ -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;
}