Commit b13449a1 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

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.

BUG: 375305
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
parent 6ab34e5c
......@@ -488,7 +488,12 @@ bool SFTPInternal::createUDSEntry(const QString &filename, const QByteArray &pat
entry.fastInsert(KIO::UDSEntry::UDS_ACCESS_TIME, sb->atime);
entry.fastInsert(KIO::UDSEntry::UDS_MODIFICATION_TIME, sb->mtime);
entry.fastInsert(KIO::UDSEntry::UDS_CREATION_TIME, sb->createtime);
if (sb->flags & SSH_FILEXFER_ATTR_CREATETIME) {
// Availability depends on outside factors.
// https://bugs.kde.org/show_bug.cgi?id=375305
entry.fastInsert(KIO::UDSEntry::UDS_CREATION_TIME, sb->createtime);
}
}
sftp_attributes_free(sb);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment