summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-10-24 14:58:11 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-03-29 18:15:04 +0000
commit811118f68df4171268f65fa6fc075d6c7633f1e4 (patch)
tree7554f088c4966304b5edd52c847ded147f515e51
parente2de837198884b64345f746ef257e6d83bffa571 (diff)
qmake: make IoUtils::fileType() return more expressive result
it now does not see anything except regular files and directories any more. that's not expected to be a problem, given the function's scope. Change-Id: I53063ad8cacb3afe5cc1baf6d6d5feba3465e74f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> (cherry picked from qtcreator/cf82f210804151452fce3cddb3cb2793dab976eb) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--qmake/library/ioutils.cpp2
-rw-r--r--qmake/library/qmakevfs.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp
index cb4aa5e74d..4aa3282e3b 100644
--- a/qmake/library/ioutils.cpp
+++ b/qmake/library/ioutils.cpp
@@ -60,7 +60,7 @@ IoUtils::FileType IoUtils::fileType(const QString &fileName)
struct ::stat st;
if (::stat(fileName.toLocal8Bit().constData(), &st))
return FileNotFound;
- return S_ISDIR(st.st_mode) ? FileIsDir : FileIsRegular;
+ return S_ISDIR(st.st_mode) ? FileIsDir : S_ISREG(st.st_mode) ? FileIsRegular : FileNotFound;
#endif
}
diff --git a/qmake/library/qmakevfs.cpp b/qmake/library/qmakevfs.cpp
index 7631723b1b..c40f49c4ad 100644
--- a/qmake/library/qmakevfs.cpp
+++ b/qmake/library/qmakevfs.cpp
@@ -155,7 +155,7 @@ bool QMakeVfs::exists(const QString &fn)
if (it != m_files.constEnd())
return it->constData() != m_magicMissing.constData();
#endif
- bool ex = IoUtils::exists(fn);
+ bool ex = IoUtils::fileType(fn) == IoUtils::FileIsRegular;
#ifndef PROEVALUATOR_FULL
m_files[fn] = ex ? m_magicExisting : m_magicMissing;
#endif