Address review comments
This commit is contained in:
parent
200f09522d
commit
aef3658a5f
3 changed files with 6 additions and 7 deletions
|
@ -1760,10 +1760,13 @@ func copyFile(dst string, src string) error {
|
|||
// ignore subsequent errors
|
||||
_ = srcFile.Close()
|
||||
_ = dstFile.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
err = srcFile.Close()
|
||||
if err != nil {
|
||||
// ignore subsequent errors
|
||||
_ = dstFile.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,8 @@ func TestRcloneExit(t *testing.T) {
|
|||
}
|
||||
rtest.OK(t, err)
|
||||
defer func() {
|
||||
rtest.OK(t, be.Close())
|
||||
// ignore the error as the test will kill rclone (see below)
|
||||
_ = be.Close()
|
||||
}()
|
||||
|
||||
err = be.cmd.Process.Kill()
|
||||
|
|
|
@ -420,12 +420,7 @@ func (r *Repository) saveIndex(ctx context.Context, indexes ...*Index) error {
|
|||
debug.Log("Saved index %d as %v", i, sid)
|
||||
}
|
||||
|
||||
err := r.idx.MergeFinalIndexes()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return r.idx.MergeFinalIndexes()
|
||||
}
|
||||
|
||||
// SaveIndex saves all new indexes in the backend.
|
||||
|
|
Loading…
Reference in a new issue