From 41e63f74e93ca41722f4e705492737d800f3cf0f Mon Sep 17 00:00:00 2001 From: Mitchell-Johnson Date: Tue, 22 Sep 2026 20:19:19 -0700 Subject: [PATCH] =?UTF-8?q?space:=2032-bit=20builds=20=E2=80=94=20stat=20f?= =?UTF-8?q?ields=20are=20int32=20there?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- internal/space/walk.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/space/walk.go b/internal/space/walk.go index c63d748..e1f3541 100644 --- a/internal/space/walk.go +++ b/internal/space/walk.go @@ -90,7 +90,7 @@ func Walk(ctx context.Context, roots []string, progress func(Progress)) (*Node, if err := syscall.Lstat(r, &st); err != nil || st.Mode&syscall.S_IFMT != syscall.S_IFDIR { continue } - n := &Node{Name: filepath.Base(r), Dir: true, MTime: st.Mtim.Sec} + n := &Node{Name: filepath.Base(r), Dir: true, MTime: int64(st.Mtim.Sec)} if r == "/" { n = root } @@ -211,7 +211,7 @@ func (w *walker) readDir(j job) { } switch st.Mode & syscall.S_IFMT { case syscall.S_IFDIR: - c := &Node{Name: name, Dir: true, MTime: st.Mtim.Sec} + c := &Node{Name: name, Dir: true, MTime: int64(st.Mtim.Sec)} j.node.Children = append(j.node.Children, c) if uint64(st.Dev) != j.dev { c.Mount = true // something else is mounted here; if it is this disk's too, it is a root of its own @@ -219,15 +219,15 @@ func (w *walker) readDir(j job) { } w.push(job{path: p, node: c, dev: j.dev}) case syscall.S_IFREG, syscall.S_IFLNK: - alloc := st.Blocks * 512 + alloc := int64(st.Blocks) * 512 w.files.Add(1) w.bytes.Add(alloc) - if alloc >= KeepMin || st.Size >= KeepMin { - j.node.Children = append(j.node.Children, &Node{Name: name, Size: alloc, Apparent: st.Size, MTime: st.Mtim.Sec}) + if alloc >= KeepMin || int64(st.Size) >= KeepMin { + j.node.Children = append(j.node.Children, &Node{Name: name, Size: alloc, Apparent: int64(st.Size), MTime: int64(st.Mtim.Sec)}) } else { j.node.SmallN++ j.node.SmallSize += alloc - j.node.Apparent += st.Size // added to the directory's own apparent total below + j.node.Apparent += int64(st.Size) // added to the directory's own apparent total below } } }