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.
This commit is contained in:
Olivier Goffart 2016-09-10 17:08:52 +02:00
parent 9e895a6ecc
commit 98268d102f

View file

@ -12,6 +12,7 @@
*/
#include "excludedfiles.h"
#include "utility.h"
#include <QFileInfo>
@ -70,7 +71,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;
}