mirror of
https://github.com/restic/restic.git
synced 2025-12-14 02:57:04 +00:00
improve fprintf related error handling
This commit is contained in:
@@ -351,12 +351,7 @@ func TestBackupExclude(t *testing.T) {
|
||||
for _, filename := range backupExcludeFilenames {
|
||||
fp := filepath.Join(datadir, filename)
|
||||
rtest.OK(t, os.MkdirAll(filepath.Dir(fp), 0755))
|
||||
|
||||
f, err := os.Create(fp)
|
||||
rtest.OK(t, err)
|
||||
|
||||
fmt.Fprint(f, filename)
|
||||
rtest.OK(t, f.Close())
|
||||
rtest.OK(t, os.WriteFile(fp, []byte(filename), 0o666))
|
||||
}
|
||||
|
||||
snapshots := make(map[string]struct{})
|
||||
|
||||
Reference in New Issue
Block a user