Skip to content

passthroughfs example does not truncate a file if it is already opened #144

Description

@pmvr

For example, if there exists a nonempty file in the mounted directory which is opened (for example) for reading and then again (by a different process) for read/write with the truncate flag, i.e.
os.open(FILENAME, os.O_RDWR | os.O_TRUNC)
it is not truncated.

This is because the inode exists in self._inode_fd_map and os.open with the new flags is not executed by the open method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions