mirror of
https://github.com/rclone/rclone.git
synced 2026-01-04 09:33:36 +00:00
Create separate interface for object information.
Take out read-only information about a Fs in a separate struct to limit access. See discussion at #282.
This commit is contained in:
committed by
Nick Craig-Wood
parent
85a0f25b95
commit
ef06371c93
@@ -188,7 +188,8 @@ func (r *Run) WriteObjectTo(f fs.Fs, remote, content string, modTime time.Time)
|
||||
}
|
||||
for tries := 1; ; tries++ {
|
||||
in := bytes.NewBufferString(content)
|
||||
_, err := f.Put(in, remote, modTime, int64(len(content)))
|
||||
objinfo := fs.NewStaticObjectInfo(remote, modTime, int64(len(content)), true, nil, nil)
|
||||
_, err := f.Put(in, objinfo)
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user