diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp index 91f0e912c15ef..168e3ca549d24 100644 --- a/src/csync/csync_exclude.cpp +++ b/src/csync/csync_exclude.cpp @@ -453,7 +453,7 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const QString &path, Ite QStringView bnameStr(path); int lastSlash = path.lastIndexOf(QLatin1Char('/')); if (lastSlash >= 0) { - bnameStr = path.mid(lastSlash + 1); + bnameStr = bnameStr.mid(lastSlash + 1); } QString basePath(_localPath + path);