Files
podman/pkg/bindings/images/build_unix.go
Daniel J Walsh ba884865c5 Handle hard links in remote builds
Fixes: https://github.com/containers/podman/issues/9893

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-25 15:25:02 -04:00

17 lines
232 B
Go

// +build !windows
package images
import (
"os"
"syscall"
)
func checkHardLink(fi os.FileInfo) (devino, bool) {
st := fi.Sys().(*syscall.Stat_t)
return devino{
Dev: uint64(st.Dev),
Ino: uint64(st.Ino),
}, st.Nlink > 1
}