From 5eefebcb48ac1be682ea50a23c544df93b04dc07 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 7 Jan 2026 03:22:44 +0900 Subject: internal/pkg: reject entry types disallowed in the cache These are not encoded in the format, they are rejected here to serve as a check for cache since checksum is computed for every directory. Signed-off-by: Ophestra --- internal/pkg/dir.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/pkg/dir.go') diff --git a/internal/pkg/dir.go b/internal/pkg/dir.go index 3e7ad6c2..e446c569 100644 --- a/internal/pkg/dir.go +++ b/internal/pkg/dir.go @@ -184,6 +184,8 @@ func Flatten(fsys fs.FS, root string, w io.Writer) (n int, err error) { return err } ent.Data = []byte(newpath) + } else if !ent.Mode.IsDir() { + return InvalidFileModeError(ent.Mode) } nr, err = ent.Encode(w) -- cgit v1.3.1