diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-24 14:58:11 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-09-14 13:50:16 +0000 |
commit | b3c412e507f921ca3e53566eaa1f52b8a5065ab0 (patch) | |
tree | 640f967cef63c400031ac28c355244e14ef96821 /src/linguist/shared/ioutils.cpp | |
parent | 7eefa1f07bbe5a2482d1d936a190c9b9e9eea4f0 (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>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtcreator/cf82f210804151452fce3cddb3cb2793dab976eb)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/linguist/shared/ioutils.cpp')
-rw-r--r-- | src/linguist/shared/ioutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linguist/shared/ioutils.cpp b/src/linguist/shared/ioutils.cpp index 733f4a6bd..d73757529 100644 --- a/src/linguist/shared/ioutils.cpp +++ b/src/linguist/shared/ioutils.cpp @@ -61,7 +61,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 } |