Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

vfs: fix saving from chrome without --vfs-cache-mode writes #4293

Nick Craig-Wood4441e012cf66
diff --git a/vfs/write.go b/vfs/write.go
index 2f5d039d6..bc8c01677 100644
--- a/vfs/write.go
+++ b/vfs/write.go
@@ -283,11 +283,9 @@ func (fh *WriteFileHandle) Stat() (os.FileInfo, error) {
// Truncate file to given size
func (fh *WriteFileHandle) Truncate(size int64) (err error) {
+ // defer log.Trace(fh.remote, "size=%d", size)("err=%v", &err)
fh.mu.Lock()
defer fh.mu.Unlock()
- if fh.closed {
- return ECLOSED
- }
if size != fh.offset {
fs.Errorf(fh.remote, "WriteFileHandle: Truncate: Can't change size without --vfs-cache-mode >= writes")
return EPERM