diff options
| author | JosJuice <josjuice@gmail.com> | 2022-12-24 09:45:58 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-12-24 11:13:27 +0100 |
| commit | 71f1b1db3445ca8299ee8458bf4946f76ba5229e (patch) | |
| tree | c4621b035cc751276147e2742f9af2e068006cfb /Source | |
| parent | 54a6c4a90dc02ccb2036f3309ded70f40403242a (diff) | |
Boot: Fix handling of M3U file paths containing backslashes
Previously, if a user on Windows launched Dolphin from the command line
and specified a path to an M3U file and included backslashes in this path,
Dolphin would fail to resolve relative paths in the M3U file.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/Boot/Boot.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 369e04268b..1ebe44c219 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -205,6 +205,9 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std { ASSERT(!paths.empty()); + for (std::string& path : paths) + UnifyPathSeparators(path); + const bool is_drive = Common::IsCDROMDevice(paths.front()); // Check if the file exist, we may have gotten it from a --elf command line // that gave an incorrect file name @@ -225,6 +228,9 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std if (paths.empty()) return {}; + for (std::string& path : paths) + UnifyPathSeparators(path); + SplitPath(paths.front(), nullptr, nullptr, &extension); Common::ToLower(&extension); } |
