mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 22:27:35 +00:00
Fix double error message
This commit is contained in:
parent
9f5565b0fc
commit
347a645450
@ -623,7 +623,7 @@ func readdir(filesystem fs.FS, dir string) ([]os.FileInfo, error) {
|
|||||||
entries, err := f.Readdir(-1)
|
entries, err := f.Readdir(-1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = f.Close()
|
_ = f.Close()
|
||||||
return nil, errors.Wrapf(err, "Readdir %v failed: %v", dir, err)
|
return nil, errors.Wrapf(err, "Readdir %v failed", dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = f.Close()
|
err = f.Close()
|
||||||
@ -644,7 +644,7 @@ func readdirnames(filesystem fs.FS, dir string) ([]string, error) {
|
|||||||
entries, err := f.Readdirnames(-1)
|
entries, err := f.Readdirnames(-1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = f.Close()
|
_ = f.Close()
|
||||||
return nil, errors.Wrapf(err, "Readdirnames %v failed: %v", dir, err)
|
return nil, errors.Wrapf(err, "Readdirnames %v failed", dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = f.Close()
|
err = f.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user