audiotags icon indicating copy to clipboard operation
audiotags copied to clipboard

`read_from_path` should not panic without extension

Open woelper opened this issue 2 years ago • 1 comments

currently, extensions are handled like this:

path.as_ref()
    .extension()
    .unwrap()
    .to_string_lossy()
    .to_string()
    .to_lowercase()
    .as_str(),

Which could panic due to the unwrap(). as try_from_ext already handles extensions, maybe we could unwrap_or into an empty OsStr or use ??

woelper avatar Oct 21 '21 21:10 woelper

Hm. We just re-merged audiotags2 into audiotags and there were a lot of changes.

I think these unwraps may be still there - I have to check

Please feel free to send a PR to fix and put some erroring if you find panic'y unwraps

pinkforest avatar Jul 31 '22 16:07 pinkforest