mirror of
https://github.com/restic/restic.git
synced 2024-12-22 07:43:03 +00:00
Merge pull request #2623 from alrs/internal-restic-err-before-close
internal/restic: close os.File after checking for error
This commit is contained in:
commit
9efbe98879
1 changed files with 1 additions and 1 deletions
|
@ -13,10 +13,10 @@ import (
|
|||
|
||||
func (node Node) restoreSymlinkTimestamps(path string, utimes [2]syscall.Timespec) error {
|
||||
dir, err := fs.Open(filepath.Dir(path))
|
||||
defer dir.Close()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Open")
|
||||
}
|
||||
defer dir.Close()
|
||||
|
||||
times := []unix.Timespec{
|
||||
{Sec: utimes[0].Sec, Nsec: utimes[0].Nsec},
|
||||
|
|
Loading…
Reference in a new issue