diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-24 14:58:11 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-29 18:15:04 +0000 |
commit | 811118f68df4171268f65fa6fc075d6c7633f1e4 (patch) | |
tree | 7554f088c4966304b5edd52c847ded147f515e51 /qmake/library/ioutils.cpp | |
parent | e2de837198884b64345f746ef257e6d83bffa571 (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>
Diffstat (limited to 'qmake/library/ioutils.cpp')
-rw-r--r-- | qmake/library/ioutils.cpp | 2 |
1 files changed, 1 insertions, 1 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 } |