mirror of
https://github.com/rclone/rclone.git
synced 2026-01-06 10:33:34 +00:00
build: fix errors spotted by ineffassign linter
These were mostly caused by shadowing err and a good fraction of them will have caused errors not to be propagated properly.
This commit is contained in:
@@ -116,7 +116,7 @@ func (fh *RWFileHandle) openPending(truncate bool) (err error) {
|
||||
if o != nil && fh.file.rwOpens() == 0 {
|
||||
cacheObj, err := fh.d.vfs.cache.f.NewObject(fh.remote)
|
||||
if err == nil && cacheObj != nil {
|
||||
cacheObj, err = copyObj(fh.d.vfs.cache.f, cacheObj, fh.remote, o)
|
||||
_, err = copyObj(fh.d.vfs.cache.f, cacheObj, fh.remote, o)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "open RW handle failed to update cached file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user