• Jakob Unterwurzacher's avatar
    pathfs: simplify pathInode.GetAttr · 66de2f17
    Jakob Unterwurzacher authored
    The function was written with only a single return at
    the end, which was elegant, but harder to follow.
    
    Add early returns to handle common cases and add a few
    comments.
    
    A functional change is that we now catch when we get
    OK with fi == nil and return EINVAL and log a message.
    This should not happen and is a bug in the filesystem
    implementation.
    
    Passes ./all.bash and the gocryptfs test suite.
    66de2f17
pathfs.go 19.9 KB