aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-03-28 16:04:23 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2014-03-28 16:44:51 +0100
commita27c3eec3345dff11ba1f67ff7b060eaef7a8090 (patch)
treedabc53a7bd47450e5cb267c5fdd030e3c43418c5
parent64531a06e3218ec369d0f3f7e1ffc95018ac9453 (diff)
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 <christian.kandeler@digia.com>
-rw-r--r--src/lib/corelib/tools/fileinfo.cpp2
1 files changed, 1 insertions, 1 deletions
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;