Closed kylejohnson closed 4 years ago
Naive fix is there: https://github.com/khenriks/mp3fs/compare/master...bak1an:case-insensitive-naive
However, it won't work for all the possible cases like .fLaC
, .OGG
, etc; and the behaviour for cases when there is identically named files in the same directory with only difference in extension being uppercase will be rather random.
I would suggest adding another options flag that will change the way we're transforming filenames: instead of replacing file extension with target extension (.mp3
) it would append it to original filename (and shadow origin file from being returned from readdir
), so something.FLAC
becomes something.FLAC.mp3
and something.fLaC
becomes something.fLaC.mp3
.
Decoder::CreateDecoder(...)
will also downcase extension before comparing.
Does this sound sane?
I think adding the options flag just like you described would make sense.
https://github.com/khenriks/mp3fs/blob/master/src/coders.cc#L73 calls
file_type
to determine if a file is a'flac'
, however what it really is doing is checking the file extension.In my case, I have many millions of flac files which have the extension
.FLAC
, which while they are valid flac files, mp3fs fails to transcode them asflac != FLAC
.This is on Ubuntu 16.04.2 with a recent git clone of the mp3fs repo.