]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
ExcludeFiles: Fix when the folder casing is not the same in the settings and in the FS
authorOlivier Goffart <ogoffart@woboq.com>
Sat, 10 Sep 2016 15:08:52 +0000 (17:08 +0200)
committerChristian Kamm <mail@ckamm.de>
Mon, 12 Sep 2016 12:09:12 +0000 (14:09 +0200)
If the folder has different case in the settings and in the FS, we should
not ignore all the files. This is important for the files system watcher.

(cherry picked from commit 98268d102fb343c103cbb4fb28dedd390f3c9ecf)

src/libsync/excludedfiles.cpp

index b2839d05da7c82a02e1d972873009928693ab7da..6af6d8a00672ff1808f3fbc9b8d2579bc6da4e7f 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include "excludedfiles.h"
+#include "utility.h"
 
 #include <QFileInfo>
 
@@ -63,7 +64,7 @@ bool ExcludedFiles::isExcluded(
         const QString& basePath,
         bool excludeHidden) const
 {
-    if (!filePath.startsWith(basePath)) {
+    if (!filePath.startsWith(basePath, Utility::fsCasePreserving() ? Qt::CaseInsensitive : Qt::CaseSensitive)) {
         // Mark paths we're not responsible for as excluded...
         return true;
     }