From 2df001a5eb5ecc528c12597621aa00b3adbc8396 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 22 Apr 2026 09:38:33 +0200 Subject: [PATCH] server: report content length for session files in stat makeStat was missing a case for /s/{id}/{file} paths, so stat reported Length=0 and clients (cat via 9pfuse) read zero bytes. --- server.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server.go b/server.go index aba8876..a5d566f 100644 --- a/server.go +++ b/server.go @@ -1633,6 +1633,15 @@ func (s *Server) makeStat(path string) plan9.Dir { } } } + case strings.HasPrefix(path, "/s/"): + parts := strings.SplitN(strings.TrimPrefix(path, "/s/"), "/", 2) + if len(parts) == 2 { + if sfs, ok := s.sessionFileStore(parts[0]); ok { + if info, err := sfs.Stat(parts[1]); err == nil { + dir.Length = uint64(info.Size()) + } + } + } } }