From 2546446d51bd42bf13ce4d17926742545813dc51 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 5 Nov 2023 10:53:42 +0200 Subject: feat(tvix/castore): bump [Directory,File]Node size to u64 Having more than 4GiB files is quite possible (think about the NixOS graphical installer, and an uncompressed iso of it). No wire format changes. Change-Id: Ia78a07e4c554e91b93c5b9f8533266e4bd7f22b6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9950 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/castore-go/castore.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix/castore-go/castore.go') diff --git a/tvix/castore-go/castore.go b/tvix/castore-go/castore.go index c9e3757885a0..40aeaf191179 100644 --- a/tvix/castore-go/castore.go +++ b/tvix/castore-go/castore.go @@ -12,9 +12,9 @@ import ( // The size of a directory is calculated by summing up the numbers of // `directories`, `files` and `symlinks`, and for each directory, its size // field. -func (d *Directory) Size() uint32 { - var size uint32 - size = uint32(len(d.Files) + len(d.Symlinks)) +func (d *Directory) Size() uint64 { + var size uint64 + size = uint64(len(d.Files) + len(d.Symlinks)) for _, d := range d.Directories { size += 1 + d.Size } -- cgit 1.4.1