Skip to content

tre panics on non-UTF8 filenames #141

Description

@sp1ff

Just installed your tool & looking forward to using it.

I'm running Arch Linux, with LANG set to en_US.UTF-8. I happen to have in my directory a file with a non-UTF8 filename. I realize that, given my environment, this would be considered unexpected. Ironically, I constructed it to trouble-shoot a bug regarding non-UTF8 filenames in one of my projects.

That said, when I run tre I am told:

thread 'main' (1581847) panicked at /home/mgh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tre-0.1.1/src/streamer.rs:60:67:
called `Result::unwrap()` on an `Err` value: "zo\xE8.mp3"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Which seems to me not a great UX. FWIW, a simple ls displays:

'zo'$'\350''.mp3'

You might consider rendering unexpected filenames something like that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions