Bug 206921

Summary: Copying a file, between sftp sessions, in "synchronize Directories" does not preserve time/date.
Product: [Frameworks and Libraries] kio Reporter: peter.hine
Component: sftpAssignee: Andreas Schneider <asn>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, j, mb
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=300211
Latest Commit: Version Fixed In:
Attachments: screenshot showing effect of the bug

Description peter.hine 2009-09-10 01:50:58 UTC
Version:           2.0.0 "Mars Pathfinder" (using 4.3.1 (KDE 4.3.1) "release 163", KDE:KDE4:Factory:Desktop / openSUSE_11.1)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27.29-0.1-pae

Copying a file (using F5) from sftp session to another sftp session preserves time/date.
Doing same in "synchronize Directories" does not preserve time/date.

thanks
H
Comment 1 JKAbrams 2012-01-11 20:56:23 UTC
Further:
Copying from FTP -> Local hdd does not preserve date. (Dolphin/Krusader)
Syncronizing FTP <> Local hdd does preserve date. (Krusader)
KDE 4.7.4, Arch Linux
Comment 2 Michael Büker 2013-03-14 22:14:26 UTC
Created attachment 78083 [details]
screenshot showing effect of the bug
Comment 3 Michael Büker 2013-03-14 22:15:34 UTC
I confirm for Dolphin 4.10.1. See the screenshot I added.
Comment 4 Andreas Schneider 2013-03-20 16:41:58 UTC
Please add a log file for kio_sftp

http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves/Debugging_kio_sftp
Comment 5 Michael Büker 2013-03-20 18:12:03 UTC
Andreas: You should be able to produce that log yourself. Or are you saying that preserving timestamps over sftp works for you?
Comment 6 Andreas Schneider 2013-03-21 09:35:27 UTC
Preserving timestamps means that you call sftp_utimes() after it has been transferred. Which works just fine if you SFTP server supports it.

The put() command of the sftp kio slave supports setting modifications times but doesn't give an error if it doesn't work. We probably need a libssh log to see what's going on. Maybe also log an error if we can't set it.
Comment 7 Andreas Schneider 2013-05-29 06:10:25 UTC
Git commit 6979833189642b8450d73d5aeb82fcf4cb600832 by Andreas Schneider.
Committed on 29/05/2013 at 08:08.
Pushed by anschneider into branch 'master'.

kio_sftp: Add debug and warning if for setting the mtime.

M  +5    -1    kioslave/sftp/kio_sftp.cpp

http://commits.kde.org/kde-runtime/6979833189642b8450d73d5aeb82fcf4cb600832