Skip to content

Commit

Permalink
Boot: Fix handling of M3U file paths containing backslashes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JosJuice committed Dec 24, 2022
1 parent 54a6c4a commit 315d7f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/Core/Boot/Boot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,13 @@ std::unique_ptr<BootParameters> BootParameters::GenerateFromFile(std::vector<std

std::string folder_path;
std::string extension;
#ifdef HAS_STD_FILESYSTEM
const std::filesystem::path converted_path = StringToPath(paths.front());
folder_path = PathToString(converted_path.parent_path());
extension = PathToString(converted_path.extension());
#else
SplitPath(paths.front(), &folder_path, nullptr, &extension);
#endif
Common::ToLower(&extension);

if (extension == ".m3u" || extension == ".m3u8")
Expand Down

0 comments on commit 315d7f1

Please sign in to comment.