Skip to content
Permalink
Browse files

Simplify std::filesystem usage a little in Boot.cpp

If path_b is absolute, (path_a / path_b) will be the same as path_b.
  • Loading branch information...
JosJuice committed Jun 20, 2019
1 parent fab15ed commit 9c33f658a5369e34c555bff21bba579f6662934a
Showing with 1 addition and 3 deletions.
  1. +1 −3 Source/Core/Core/Boot/Boot.cpp
@@ -88,9 +88,7 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
if (!line.empty() && line.front() != '#') // Comments start with #
{
#ifdef HAS_STD_FILESYSTEM
const fs::path path_line = fs::u8path(line);
const std::string path_to_add =
path_line.is_relative() ? (fs::u8path(folder_path) / path_line).u8string() : line;
const std::string path_to_add = (fs::u8path(folder_path) / fs::u8path(line)).u8string();
#else
const std::string path_to_add = line.front() != '/' ? folder_path + line : line;
#endif

0 comments on commit 9c33f65

Please sign in to comment.
You can’t perform that action at this time.