Fix metaflac --import-tags-from-file, allow missing newline and \r#870
Fix metaflac --import-tags-from-file, allow missing newline and \r#870madah81pnz1 wants to merge 3 commits intoxiph:masterfrom
Conversation
Remove one extra feof() call since it would prevent the last line from being added if it was missing a newline at the end. Check for both \r and \n, since otherwise the tags will be added with an extra \r included in the tag value, which is unexpected. Fixes xiph#856
|
Hmm, the test doesn't seem to work on macos for some reason. |
That was surprising, I don't have a MacOS system available to test on locally though. I could modify the test to also print out the metadata it got, a hexdump diff. It could be due to slight differences in shell syntax between dash and zsh, this I could try a bit on my end first. Otherwise my guess is it has something to do with how \r was the historical line ending on MacOS. Maybe the shell on MacOS auto-translates \r it into \n, thus the \r\n in the test gets converted into \n\n. If that's the case, I could either disable the \r\n test on MacOS, or break out the \r\n handling into another PR. |
|
|
By the way, I just remembered there is a ECHO_N shell variable for this. Take a look at the rest of the scripts for uses of this. |
Thanks! I did know about ECHO_N, but completely missed to use it in one spot. |
Remove one extra feof() call since it would prevent the last line from being added if it was missing a newline at the end.
Check for both \r and \n, since otherwise the tags will be added with an extra \r included in the tag value, which is unexpected.
Fixes #856