From a27c3eec3345dff11ba1f67ff7b060eaef7a8090 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 28 Mar 2014 16:04:23 +0100 Subject: fix FileInfo::isFileCaseCorrect on OS X This function is supposed to compare file *names* and not paths. If it gets passed a path to a soft link like /tmp/foo, then the canonical file path of that will be /private/tmp/foo. We must not compare the whole path but only its file name portion. Task-number: QTCREATORBUG-11875 Change-Id: I9724c6e45057aa9a80c3a9bd00c5fc225799b6c5 Reviewed-by: Christian Kandeler --- src/lib/corelib/tools/fileinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/corelib/tools/fileinfo.cpp') diff --git a/src/lib/corelib/tools/fileinfo.cpp b/src/lib/corelib/tools/fileinfo.cpp index 1832b7f12..ccde88f13 100644 --- a/src/lib/corelib/tools/fileinfo.cpp +++ b/src/lib/corelib/tools/fileinfo.cpp @@ -218,7 +218,7 @@ bool FileInfo::isFileCaseCorrect(const QString &filePath) return actualFileName == fi.fileName(); #elif defined(Q_OS_DARWIN) QFileInfo fi(filePath); - return fi.absoluteFilePath() == fi.canonicalFilePath(); + return fi.fileName() == fileName(fi.canonicalFilePath()); #else Q_UNUSED(filePath) return true; -- cgit v1.2.3