Commit Diff


commit - 2da28ffa5677256a39b68be0a167e698c05e81bd
commit + a96bd10f7db2c3ccbd86de2ef0a73d8531320d76
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
 	}