mirror of
https://github.com/octoleo/restic.git
synced 2025-01-03 15:17:28 +00:00
Address review comments
This commit is contained in:
parent
200f09522d
commit
aef3658a5f
@ -1760,10 +1760,13 @@ func copyFile(dst string, src string) error {
|
|||||||
// ignore subsequent errors
|
// ignore subsequent errors
|
||||||
_ = srcFile.Close()
|
_ = srcFile.Close()
|
||||||
_ = dstFile.Close()
|
_ = dstFile.Close()
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = srcFile.Close()
|
err = srcFile.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// ignore subsequent errors
|
||||||
|
_ = dstFile.Close()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ func TestRcloneExit(t *testing.T) {
|
|||||||
}
|
}
|
||||||
rtest.OK(t, err)
|
rtest.OK(t, err)
|
||||||
defer func() {
|
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()
|
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)
|
debug.Log("Saved index %d as %v", i, sid)
|
||||||
}
|
}
|
||||||
|
|
||||||
err := r.idx.MergeFinalIndexes()
|
return r.idx.MergeFinalIndexes()
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SaveIndex saves all new indexes in the backend.
|
// SaveIndex saves all new indexes in the backend.
|
||||||
|
Loading…
Reference in New Issue
Block a user