forked from qt-creator/qt-creator
RemoteLinux: Fix off-by-one error for stat %Y last modified column
The -t parameter on GNU stat uses the format: %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o The -t parameter on BusyBox stat uses the format: %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o BusyBox doesn't support %W so it is not included when using -t. It was incorrectly referring to %Z (time of last status change, seconds since Epoch) because it did not take into account the first column being removed. Subtract 1 from the index so that it takes this into account and correctly refers to %Y (time of last data modification, seconds since Epoch). Task-number: QTCREATORBUG-22041 Change-Id: I272609facbd8148199d2bfcf6f5adbdc273a6b50 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -158,7 +158,7 @@ QDateTime GenericDirectUploadService::timestampFromStat(const DeployableFile &fi
|
||||
return QDateTime();
|
||||
}
|
||||
bool isNumber;
|
||||
const qint64 secsSinceEpoch = columns.at(12).toLongLong(&isNumber);
|
||||
const qint64 secsSinceEpoch = columns.at(11).toLongLong(&isNumber);
|
||||
if (!isNumber) {
|
||||
emit warningMessage(warningString);
|
||||
return QDateTime();
|
||||
|
Reference in New Issue
Block a user