Skip to content

std::os::unix::fs::MetadataExt::size() silently truncates file size on Android #28978

Closed
@eefriedman

Description

@eefriedman

The implementation of size() looks like this:

fn size(&self) -> raw::off_t { self.as_raw_stat().st_size as raw::off_t }

The field st_size has type c_longlong, and the type raw::off_t has type i32 on 32-bit Android. The combination doesn't work well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-androidOperating system: Android

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions