Skip to content

tokio::fs::File::from_std() assumes current file position is zero #6374

@allada

Description

@allada

Version
1.36.0

Platform
Any

Description
tokio::fs::File::from_std() assumes the file being passed in's position is zero even if the StdFile has a different seek position.

This can cause AsyncSeek<File>::poll_complete() to return the wrong file position which causes wrong behavior when using .seek().

See:
https://docs.rs/tokio/latest/src/tokio/fs/file.rs.html#242

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tokioArea: The main tokio crateC-bugCategory: This is a bug.M-fsModule: tokio/fs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions