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

Fixes #1195
This commit is contained in:
Nick Craig-Wood 2017-03-02 21:46:28 +00:00
parent 1d42a343d2
commit fdaac6df67

View file

@ -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
}