mirror of
https://github.com/restic/restic.git
synced 2025-10-10 12:00:56 +00:00
Add more error handling
This commit is contained in:
@@ -19,7 +19,9 @@ func TestPreallocate(t *testing.T) {
|
||||
flags := os.O_CREATE | os.O_TRUNC | os.O_WRONLY
|
||||
wr, err := os.OpenFile(path.Join(dirpath, "test"), flags, 0600)
|
||||
test.OK(t, err)
|
||||
defer wr.Close()
|
||||
defer func() {
|
||||
test.OK(t, wr.Close())
|
||||
}()
|
||||
|
||||
err = preallocateFile(wr, i)
|
||||
test.OK(t, err)
|
||||
|
Reference in New Issue
Block a user