serve nfs: fix unlikely crash

This commit is contained in:
Nick Craig-Wood 2025-03-05 11:08:26 +00:00
parent aab6643cea
commit 64b3d1d539

View File

@ -29,6 +29,7 @@ func setSys(fi os.FileInfo) {
node, ok := fi.(vfs.Node) node, ok := fi.(vfs.Node)
if !ok { if !ok {
fs.Errorf(fi, "internal error: %T is not a vfs.Node", fi) fs.Errorf(fi, "internal error: %T is not a vfs.Node", fi)
return
} }
vfs := node.VFS() vfs := node.VFS()
// Set the UID and GID for the node passed in from the VFS defaults. // Set the UID and GID for the node passed in from the VFS defaults.