Commit e3fa40e7 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

nfs: Do not set UDS_CREATION_TIME

attributes.ctime is not the file birth time but the inode
(file metadata) change time, which is not supported in KIO.

BUG:318821
parent 0c28b0b4
......@@ -1718,7 +1718,6 @@ void NFSProtocolV2::completeUDSEntry(KIO::UDSEntry& entry, const fattr& attribut
entry.replace(KIO::UDSEntry::UDS_SIZE, attributes.size);
entry.replace(KIO::UDSEntry::UDS_MODIFICATION_TIME, attributes.mtime.seconds);
entry.replace(KIO::UDSEntry::UDS_ACCESS_TIME, attributes.atime.seconds);
entry.replace(KIO::UDSEntry::UDS_CREATION_TIME, attributes.ctime.seconds);
entry.replace(KIO::UDSEntry::UDS_ACCESS, (attributes.mode & 07777));
entry.replace(KIO::UDSEntry::UDS_FILE_TYPE, attributes.mode & S_IFMT); // extract file type
......@@ -1730,7 +1729,6 @@ void NFSProtocolV2::completeBadLinkUDSEntry(KIO::UDSEntry& entry, const fattr& a
{
entry.replace(KIO::UDSEntry::UDS_MODIFICATION_TIME, attributes.mtime.seconds);
entry.replace(KIO::UDSEntry::UDS_ACCESS_TIME, attributes.atime.seconds);
entry.replace(KIO::UDSEntry::UDS_CREATION_TIME, attributes.ctime.seconds);
NFSProtocol::completeInvalidUDSEntry(entry);
}
......@@ -1997,7 +1997,6 @@ void NFSProtocolV3::completeUDSEntry(KIO::UDSEntry& entry, const fattr3& attribu
entry.replace(KIO::UDSEntry::UDS_SIZE, attributes.size);
entry.replace(KIO::UDSEntry::UDS_MODIFICATION_TIME, attributes.mtime.seconds);
entry.replace(KIO::UDSEntry::UDS_ACCESS_TIME, attributes.atime.seconds);
entry.replace(KIO::UDSEntry::UDS_CREATION_TIME, attributes.ctime.seconds);
// Some servers still send the file type information in the mode, even though
// the reference specifies NFSv3 shouldn't, so we need to work around that here.
......@@ -2042,7 +2041,6 @@ void NFSProtocolV3::completeBadLinkUDSEntry(KIO::UDSEntry& entry, const fattr3&
{
entry.replace(KIO::UDSEntry::UDS_MODIFICATION_TIME, attributes.mtime.seconds);
entry.replace(KIO::UDSEntry::UDS_ACCESS_TIME, attributes.atime.seconds);
entry.replace(KIO::UDSEntry::UDS_CREATION_TIME, attributes.ctime.seconds);
NFSProtocol::completeInvalidUDSEntry(entry);
}
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