Skip to content

Inode.IsDir and FileInfo.Mode produce incorrect results #9

@mpoindexter

Description

@mpoindexter

fs.FileMode specifies a number of bits that do not match the
file mode bits defined in the inode, so constructing a valid
fs.FileMode requires translating bits 9-16 into the equivalent
flags defined in fs package vs just casting the filemode bits
from the inode.

In addition, the IsDir method in inode was incorrect - a block device
has the value 0x6000, which means IsDir will return true for block
device nodes.

#8 should fix these problems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions