D21952: [ftp] Fix wrong access time in Ftp::ftpCopyGet()
Wolfgang Bauer
noreply at phabricator.kde.org
Fri Jun 21 10:40:19 BST 2019
wbauer created this revision.
wbauer added a reviewer: Frameworks.
wbauer added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
wbauer requested review of this revision.
REVISION SUMMARY
`sPartInfo` refers to the .part file which might not exist in the first place, resulting in a wrong/invalid access time.
To avoid this, take the access time from the actual destination file instead.
CCBUG: 374420
TEST PLAN
Run `kioclient5 copy "ftp://upload.kde.org/README" /tmp/file` and check the times with `stat`.
Before:
$ kioclient5 copy "ftp://upload.kde.org/README" /tmp/file
$ LANG=C stat /tmp/file
File: /tmp/file
Size: 594 Blocks: 8 IO Block: 4096 regular file
Device: 39h/57d Inode: 91811 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ wolfi) Gid: ( 100/ users)
Access: 1970-01-01 00:00:00.000000000 +0100
Modify: 2013-04-27 00:00:00.000000000 +0200
Change: 2019-06-21 11:09:38.980032795 +0200
Birth: -
(note the "Access" time)
With this patch:
$ kioclient5 copy "ftp://upload.kde.org/README" /tmp/file
$ LANG=C stat /tmp/file
File: /tmp/file
Size: 594 Blocks: 8 IO Block: 4096 regular file
Device: 39h/57d Inode: 91947 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ wolfi) Gid: ( 100/ users)
Access: 2019-06-21 11:28:49.000000000 +0200
Modify: 2013-04-27 00:00:00.000000000 +0200
Change: 2019-06-21 11:28:49.529808792 +0200
Birth: -
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D21952
AFFECTED FILES
src/ioslaves/ftp/ftp.cpp
To: wbauer, #frameworks
Cc: kde-frameworks-devel, #dolphin, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190621/30c30d39/attachment.html>
More information about the Kde-frameworks-devel
mailing list