Manual exclude are anchored to _localPath by default

This makes a lot of sense, since there should be no file to be synced
outside of _localPath.

Signed-off-by: Samir Benmendil <me@rmz.io>
This commit is contained in:
Samir Benmendil 2019-08-15 02:47:53 +01:00
parent e27645cb00
commit 7a9b13a563
2 changed files with 7 additions and 1 deletions

View file

@ -281,6 +281,11 @@ void ExcludedFiles::setExcludeConflictFiles(bool onoff)
_excludeConflictFiles = onoff;
}
void ExcludedFiles::addManualExclude(const QByteArray &expr)
{
addManualExclude(expr, _localPath.toUtf8());
}
void ExcludedFiles::addManualExclude(const QByteArray &expr, const QByteArray &basePath)
{
Q_ASSERT(basePath.startsWith('/'));

View file

@ -101,7 +101,8 @@ public:
* Primarily used in tests. Patterns added this way are preserved when
* reloadExcludeFiles() is called.
*/
void addManualExclude(const QByteArray &expr, const QByteArray &basePath = "/");
void addManualExclude(const QByteArray &expr);
void addManualExclude(const QByteArray &expr, const QByteArray &basePath);
/**
* Removes all manually added exclude patterns.