mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-07 04:39:26 -05:00
m3u: normalize line endings except win32
This commit is contained in:
parent
6de526c684
commit
4b55c26cdb
|
|
@ -76,6 +76,11 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
|
|||
// This is the UTF-8 representation of U+FEFF.
|
||||
constexpr std::string_view utf8_bom = "\xEF\xBB\xBF";
|
||||
|
||||
#ifndef _WIN32
|
||||
if (line.ends_with('\r'))
|
||||
line.pop_back();
|
||||
#endif
|
||||
|
||||
if (line.starts_with(utf8_bom))
|
||||
{
|
||||
WARN_LOG_FMT(BOOT, "UTF-8 BOM in file: {}", m3u_path);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user