diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-24 16:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-24 16:38:26 +0200 |
commit | 2311a02c38d42b5e0cf3981a35701c77b1b4f6d0 (patch) | |
tree | 21693a6a02bcb0a5d9689e2929ccfa16f82df57f /pkg/bindings/images/build_unix.go | |
parent | b060a7726e8e97f7752b40f18e69236cb330d22d (diff) | |
parent | f22791aec7b4d942872ca21539a44d0375b73949 (diff) | |
download | podman-2311a02c38d42b5e0cf3981a35701c77b1b4f6d0.tar.gz podman-2311a02c38d42b5e0cf3981a35701c77b1b4f6d0.tar.bz2 podman-2311a02c38d42b5e0cf3981a35701c77b1b4f6d0.zip |
Merge pull request #10421 from rhatdan/build
Handle hard links in remote builds
Diffstat (limited to 'pkg/bindings/images/build_unix.go')
-rw-r--r-- | pkg/bindings/images/build_unix.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/bindings/images/build_unix.go b/pkg/bindings/images/build_unix.go new file mode 100644 index 000000000..0afb1deb6 --- /dev/null +++ b/pkg/bindings/images/build_unix.go @@ -0,0 +1,16 @@ +// +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 +} |