diff --git a/backend/putio/fs.go b/backend/putio/fs.go index cbcda547f..2a3286133 100644 --- a/backend/putio/fs.go +++ b/backend/putio/fs.go @@ -252,9 +252,12 @@ func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options . // This will create a duplicate if we upload a new file without // checking to see if there is one already - use Put() for that. func (f *Fs) PutUnchecked(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (o fs.Object, err error) { + return f.putUnchecked(ctx, in, src, src.Remote(), options...) +} + +func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, src fs.ObjectInfo, remote string, options ...fs.OpenOption) (o fs.Object, err error) { // defer log.Trace(f, "src=%+v", src)("o=%+v, err=%v", &o, &err) size := src.Size() - remote := src.Remote() leaf, directoryID, err := f.dirCache.FindPath(ctx, remote, true) if err != nil { return nil, err diff --git a/backend/putio/object.go b/backend/putio/object.go index bd03982ca..86edb008f 100644 --- a/backend/putio/object.go +++ b/backend/putio/object.go @@ -275,7 +275,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op if err != nil { return err } - newObj, err := o.fs.PutUnchecked(ctx, in, src, options...) + newObj, err := o.fs.putUnchecked(ctx, in, src, o.remote, options...) if err != nil { return err }