Commit Diff


commit - 87ae8514a3a2d9684994a6c319f96ba9e18a062e
commit + 33d1516211d64cc5f3039898d3d635b29fbe6bf6
blob - 1f0419c579d73a6f4af29792367ac0848ee3c57d
blob + 23756c2d9ecadb41aeb0af2d621c1af389682ea4
--- readdir.go
+++ readdir.go
@@ -82,9 +82,9 @@ func (rd *Readdir) Read(ctx context.Context, p []byte,
 	}
 
 done:
-	if err == io.EOF && len(p) > 0 {
-		// Don't let io.EOF escape if we've written to p. 9p doesn't handle
-		// this like Go.
+	if err == io.EOF {
+		// Don't let io.EOF escape. EOF is indicated by a zero-length result
+		// with no error.
 		err = nil
 	}