Skip to content

Commit

Permalink
local: open files in write only mode so they can write to an rclone m…
Browse files Browse the repository at this point in the history
…ount

Fixes #1195
  • Loading branch information
ncw committed Mar 2, 2017
1 parent 1d42a34 commit fdaac6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

2 comments on commit fdaac6d

@ajkis
Copy link

@ajkis ajkis commented on fdaac6d Mar 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the best fixes since sliced bread !!!

@ncw
Copy link
Member Author

@ncw ncw commented on fdaac6d Mar 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alas not quite as exciting as you might think... This only allows rclone copy to work on an rclone mount

Please sign in to comment.