Don't read the statx struct in case of failure

Change-Id: I62d98e4463003a1da8f28318d82635f6e0b2cc8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Sérgio Martins 2017-09-25 19:40:33 +01:00
parent f7350ac99e
commit ef0129bb66

View File

@ -412,8 +412,11 @@ bool QFileSystemEngine::fillMetaData(int fd, QFileSystemMetaData &data)
int ret = qt_fstatx(fd, &statxBuffer);
if (ret != -ENOSYS) {
data.fillFromStatxBuf(statxBuffer);
return ret == 0;
if (ret == 0) {
data.fillFromStatxBuf(statxBuffer);
return true;
}
return false;
}
if (QT_FSTAT(fd, &statBuffer) == 0) {