fs: fix restoring timestamps on Windows for long paths

This commit is contained in:
Michael Eischer
2024-08-29 23:22:16 +02:00
parent efec1a5e96
commit 4469fe1575
3 changed files with 12 additions and 3 deletions

View File

@@ -315,7 +315,7 @@ func nodeRestoreTimestamps(node *restic.Node, path string) error {
return nodeRestoreSymlinkTimestamps(path, utimes)
}
if err := syscall.UtimesNano(path, utimes[:]); err != nil {
if err := syscall.UtimesNano(fixpath(path), utimes[:]); err != nil {
return errors.Wrap(err, "UtimesNano")
}