Commit 449086ee authored by Rob Pike's avatar Rob Pike

Change Stat to Lstat in Readdir so we don't recur when someone symlinks "."

R=rsc
CC=go-dev
http://go/go-review/1018003
parent b89d6309
......@@ -315,7 +315,7 @@ func (file *File) Readdir(count int) (dirs []Dir, err Error) {
}
dirs = make([]Dir, len(names));
for i, filename := range names {
dirp, err := Stat(dirname+filename);
dirp, err := Lstat(dirname+filename);
if dirp == nil || err != nil {
dirs[i].Name = filename; // rest is already zeroed out
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment