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:59:58 -07:00
committed by Shentubot
parent 0fc7b30695
commit 1501400d9c
+1 -1
View File
@@ -150,7 +150,7 @@ func toType(nodeType fs.InodeType) uint8 {
return syscall.DT_REG
case fs.Symlink:
return syscall.DT_LNK
case fs.Directory:
case fs.Directory, fs.SpecialDirectory:
return syscall.DT_DIR
case fs.Pipe:
return syscall.DT_FIFO