diff --git a/pkg/archive/archive_windows.go b/pkg/archive/archive_windows.go index 2fec29232c..882bc20252 100644 --- a/pkg/archive/archive_windows.go +++ b/pkg/archive/archive_windows.go @@ -12,7 +12,11 @@ func hasHardlinks(fi os.FileInfo) bool { func getInodeFromStat(stat interface{}) (inode uint64, err error) { s, ok := stat.(*syscall.ByHandleFileInformation) if ok { - inode = s.VolumeSerialNumber + i64, err := cast.Int64(s.VolumeSerialNumber) + if err != nil { + return -1, err + } + inode = i64 } return }