diff options
author | Jonathan Liu <net147@gmail.com> | 2019-04-26 13:43:54 +1000 |
---|---|---|
committer | Jonathan Liu <net147@gmail.com> | 2019-04-29 21:50:01 +0000 |
commit | 3284c6c6f38a087540e46766f2f6303f13c36ae9 (patch) | |
tree | e8f574df6aa49f133451053681f2f5d54b6664a6 /src/plugins/remotelinux/genericdirectuploadservice.cpp | |
parent | e5ecb0220e2f77adfd42a1cd423802a277ef29be (diff) | |
download | qt-creator-3284c6c6f38a087540e46766f2f6303f13c36ae9.tar.gz |
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>
Diffstat (limited to 'src/plugins/remotelinux/genericdirectuploadservice.cpp')
-rw-r--r-- | src/plugins/remotelinux/genericdirectuploadservice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/remotelinux/genericdirectuploadservice.cpp b/src/plugins/remotelinux/genericdirectuploadservice.cpp index 37cb14c7f2..014ed5db62 100644 --- a/src/plugins/remotelinux/genericdirectuploadservice.cpp +++ b/src/plugins/remotelinux/genericdirectuploadservice.cpp @@ -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(); |