bastion 0.53.2
ci / personal-data (push) Successful in 5s
ci / test (push) Successful in 3m4s
ci / fuzz (push) Successful in 3m45s

This commit is contained in:
Privatae
2026-10-20 04:42:14 +00:00
commit e4c9b69b46
471 changed files with 159794 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
//go:build linux
package main
// The strong cache key on Linux: device, inode, size, and the inode's change
// time. deltacache.go says why ctime is the field that matters.
import (
"os"
"strconv"
"syscall"
)
func statIdentity(fi os.FileInfo) (string, bool) {
st, ok := fi.Sys().(*syscall.Stat_t)
if !ok {
return "", false
}
return strconv.FormatUint(uint64(st.Dev), 10) + ":" +
strconv.FormatUint(st.Ino, 10) + ":" +
strconv.FormatInt(fi.Size(), 10) + ":" +
strconv.FormatInt(st.Ctim.Sec, 10) + "." +
strconv.FormatInt(st.Ctim.Nsec, 10), true
}