Skip to content

[Bug] reading pcap files on non UTF-8 Windows system fails due to convert path to str fails #383

@JackLiar

Description

@JackLiar

Ad src/capture/mod.rs:113, new_raw is accepting a Option<&str> as input, this method is not only used by inactive handle, but also used by active handle reading pcap files.

More specific, at src/capture/activated/offline.rs:20, we do path.as_ref().to_str(), but apparently this would failed if the path is not a UTF8 encoded Path.

The purpose of PathBuf & Path is to avoid encoding issue, to_str() is not an elegant way.

Hope we could get a quick fix soon :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions