Skip to content

Commit

Permalink
trying to check what happen on window
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Bustamante <[email protected]>
  • Loading branch information
jjbustamante committed Nov 8, 2023
1 parent c4f2724 commit 6dbc7cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/archive/archive_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ package archive

import (
"os"
"syscall"
)

func hasHardlinks(fi os.FileInfo) bool {
return fi.Sys().(*os.winSys).Nlink > 1
return fi.Sys().(*syscall.ByHandleFileInformation).NumberOfLinks > 1
}

func getInodeFromStat(stat interface{}) (inode uint64, err error) {
s, ok := stat.(*os.winSys)
s, ok := stat.(*syscall.ByHandleFileInformation)
if ok {
inode = s.Ino
inode = s.VolumeSerialNumber
}
return
}

0 comments on commit 6dbc7cc

Please sign in to comment.