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.
BUG: 375305
FIXED-IN: 20.04
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.
BUG: 375305
FIXED-IN: 20.04
browsing a directory on btrfs over sftp doesn't show creation time as 1970
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Btrfs definitely does support birthtime
sftp/kio_sftp.cpp | ||
---|---|---|
491–496 | You should check for SSH_FILEXFER_ATTR_CREATETIME in the flags field: |
At least the openssh implementation apparently only supports atime/mtime:
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/sftp-common.c?rev=1.31&content-type=text/x-cvsweb-markup
Please correct the comment in the code - it depends on the server SFTP implementation.
I guess on both but ultimately on the SFTP implementation that can lack the implementation when the underlying filesystem has the birth time.
Looks ok now.
Should be followed up by a corresponding change for ACCESS_TIME/MODIFICATION_TIME - both are optional as well.