Skip to content

Commit

Permalink
Merge pull request restic#5134 from MichaelEischer/better-time-restor…
Browse files Browse the repository at this point in the history
…e-error

restore: improve error if timestamp fails to restore
  • Loading branch information
MichaelEischer authored Nov 30, 2024
2 parents a5c49e5 + a73ae7b commit 8644bb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/fs/node.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fs

import (
"fmt"
"os"
"os/user"
"strconv"
Expand Down Expand Up @@ -296,7 +297,7 @@ func nodeRestoreTimestamps(node *restic.Node, path string) error {
mtime := node.ModTime.UnixNano()

if err := utimesNano(fixpath(path), atime, mtime, node.Type); err != nil {
return &os.PathError{Op: "UtimesNano", Path: path, Err: err}
return fmt.Errorf("failed to restore timestamp of %q: %w", path, err)
}
return nil
}

0 comments on commit 8644bb1

Please sign in to comment.