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>
This commit is contained in:
parent
e2de837198
commit
811118f68d
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user