forked from TrueCloudLab/restic
restore: improve error if timestamp fails to restore
This commit is contained in:
parent
bd16804812
commit
a73ae7ba1a
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package fs
|
package fs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -296,7 +297,7 @@ func nodeRestoreTimestamps(node *restic.Node, path string) error {
|
||||||
mtime := node.ModTime.UnixNano()
|
mtime := node.ModTime.UnixNano()
|
||||||
|
|
||||||
if err := utimesNano(fixpath(path), atime, mtime, node.Type); err != nil {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue