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

local: open files in write only mode so they can write to an rclone mount

Nick Craig-Woodfdaac6df67b1
diff --git a/local/local.go b/local/local.go
index 126afb160..0d7ac810e 100644
--- a/local/local.go
+++ b/local/local.go
@@ -702,7 +702,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error {
return err
}
- out, err := os.Create(o.path)
+ out, err := os.OpenFile(o.path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
if err != nil {
return err
}