Bug 375305 - SFTP file create date is wrong
Summary: SFTP file create date is wrong
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: SFTP (show other bugs)
Version: 5.8.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-19 17:09 UTC by Victor Porton
Modified: 2021-10-08 09:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Porton 2017-01-19 17:09:43 UTC
Dolphin shows Jan 1970 as file creation date when seeing properties of a file opened with an sftp:// bookmark.

It looks like to be caused by blind copying of FTP code into the SFTP handler, because FTP does not support file creation date (but SFTP should support it).
Comment 1 Elvis Angelaccio 2017-01-19 17:33:50 UTC
Thanks for report, I can reproduce. Moving to kio-extras where sftp:// lives.
Comment 2 Andreas Schneider 2018-09-03 05:41:16 UTC
You mean you just connect to a sftp server, choose a file, right click on it an select properties?
Comment 3 Victor Porton 2018-09-03 05:48:50 UTC
@Andreas Schneider

Yes.
Comment 4 Harald Sitter 2020-03-25 12:35:12 UTC
Git commit b13449a13b00a882a93230b8180200d4709c3e8b by Harald Sitter.
Committed on 25/03/2020 at 12:30.
Pushed by sitter into branch 'master'.

sftp: do not show creation time when we do not know it

Summary:
creation time (aka birth time) is file system dependent, if the fs doesn't
support it we seem to get createtime==0. skip over it when that is the
case.
FIXED-IN: 20.04

Test Plan: browsing a directory on btrfs over sftp doesn't show creation time as 1970

Reviewers: ngraham, bruns, meven

Reviewed By: ngraham, bruns, meven

Subscribers: meven, bruns, kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D27873

M  +6    -1    sftp/kio_sftp.cpp

https://commits.kde.org/kio-extras/b13449a13b00a882a93230b8180200d4709c3e8b
Comment 5 Bug Janitor Service 2021-10-08 09:39:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kio-extras/-/merge_requests/126
Comment 6 Méven Car 2021-10-08 09:52:47 UTC
Git commit 0cbdeb1fc5a7e2b51ffcd8e931ad01b89c9672d9 by Méven Car.
Committed on 08/10/2021 at 09:38.
Pushed by sitter into branch 'master'.

sftp: avoid bogus KIO::UDSEntry::UDS_CREATION_TIME values

"flags & SSH_FILEXFER_ATTR_CREATETIME" check was missing in listDir

M  +3    -1    sftp/kio_sftp.cpp

https://invent.kde.org/network/kio-extras/commit/0cbdeb1fc5a7e2b51ffcd8e931ad01b89c9672d9