posix/readDir should populate name for DT_UKNOWN (#8240)

In commit a8296445ad we changed the code to handle
some corner cases on ARM and other platforms, this
PR just avoids the return for unknown filetypes
prematurely and let the name be populated appropriately.

This fixes bug for older XFS implementations such as
in Ubuntu 14.04
master
Harshavardhana 5 years ago committed by kannappanr
parent 3064da7b08
commit 14b137aa66
  1. 1
      cmd/posix-list-dir_unix.go

@ -58,7 +58,6 @@ func parseDirEnt(buf []byte) (consumed int, name string, typ os.FileMode, err er
// to handle such files, MinIO is only interested in // to handle such files, MinIO is only interested in
// files and directories. // files and directories.
typ = unexpectedFileMode typ = unexpectedFileMode
return
} }
nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0])) nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0]))

Loading…
Cancel
Save