From: Camila Date: Fri, 2 Oct 2020 06:57:15 +0000 (+0200) Subject: Add last / to exclude list file path. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~42^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=998e93ac1360d65f734a83c4754676908f9a2927;p=nextcloud-desktop.git Add last / to exclude list file path. This Q_ASSERT(this->endsWith('/')) in BasePathByteArray was the reason for bug report #1458. Signed-off-by: Camila --- diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp index dadd611bf..b34a521cf 100644 --- a/src/csync/csync_exclude.cpp +++ b/src/csync/csync_exclude.cpp @@ -411,10 +411,12 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const char *path, ItemTy // Directories are guaranteed to be visited before their files if (filetype == ItemTypeDirectory) { - QFileInfo fi = QFileInfo(_localPath + path + "/.sync-exclude.lst"); + const auto basePath = QString(_localPath + path + QLatin1Char('/')).toUtf8(); + const auto fi = QFileInfo(basePath + QStringLiteral(".sync-exclude.lst")); + if (fi.isReadable()) { addInTreeExcludeFilePath(fi.absoluteFilePath()); - loadExcludeFile(fi.absolutePath().toUtf8(), fi.absoluteFilePath()); + loadExcludeFile(basePath, fi.absoluteFilePath()); } }