From 9c33f658a5369e34c555bff21bba579f6662934a Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 20 Jun 2019 10:42:56 +0200 Subject: [PATCH] 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. --- Source/Core/Core/Boot/Boot.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 1f34b30ead..50fb2f7282 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -88,9 +88,7 @@ static std::vector 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