getdents should return type=DT_DIR for SpecialDirectories.

It was returning DT_UNKNOWN, and this was breaking numpy.

PiperOrigin-RevId: 209459351
Change-Id: Ic6f548e23aa9c551b2032b92636cb5f0df9ccbd4
This commit is contained in:
Nicolas Lacasse 2018-08-20 11:58:46 -07:00 committed by Shentubot
parent 0fc7b30695
commit 1501400d9c
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ func toType(nodeType fs.InodeType) uint8 {
return syscall.DT_REG return syscall.DT_REG
case fs.Symlink: case fs.Symlink:
return syscall.DT_LNK return syscall.DT_LNK
case fs.Directory: case fs.Directory, fs.SpecialDirectory:
return syscall.DT_DIR return syscall.DT_DIR
case fs.Pipe: case fs.Pipe:
return syscall.DT_FIFO return syscall.DT_FIFO