ExcludeFiles: Fix when the folder casing is not the same in the settings and in the FS

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 98268d102f)
This commit is contained in:
Olivier Goffart 2016-09-10 17:08:52 +02:00 committed by Christian Kamm
parent 65c49e1de6
commit 1040e7b57b

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