Commit 57e8d467 authored by Fabian Vogt's avatar Fabian Vogt

Merge branch 'fixWriteSize' into 'master'

Don't change file size overzealously

See merge request kde/kio-fuse!24
parents 61a7d1db 4bd28bde
......@@ -1054,7 +1054,8 @@ void KIOFuseVFS::write(fuse_req_t req, fuse_ino_t ino, const char *buf, size_t s
remoteNode->m_cacheSize = std::max(remoteNode->m_cacheSize, off_t(offset + size));
remoteNode->m_stat.st_size = remoteNode->m_cacheSize;
// Don't set it to a lower value, in case the cache is incomplete
remoteNode->m_stat.st_size = std::max(remoteNode->m_stat.st_size, remoteNode->m_cacheSize);
// Update [cm] time as without writeback caching,
// the kernel doesn't do this for us.
clock_gettime(CLOCK_REALTIME, &remoteNode->m_stat.st_mtim);
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