From 9c66f81cbc85b24bcca1b608a7fec3f19e18752d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 11 May 2021 10:32:59 +0200 Subject: [PATCH] Address additional feedback --- Common/File/Path.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Common/File/Path.cpp b/Common/File/Path.cpp index 5f5a28bd4d..ee273f6e36 100644 --- a/Common/File/Path.cpp +++ b/Common/File/Path.cpp @@ -1,3 +1,5 @@ +#include "ppsspp_config.h" + #include "Common/File/Path.h" #include "Common/StringUtils.h" #include "Common/Log.h" @@ -120,9 +122,11 @@ std::string Path::GetDirectory() const { return "/"; // We're at the root. } return path_.substr(0, pos); +#if PPSSPP_PLATFORM(WINDOWS) } else if (path_.size() == 2 && path_[1] == ':') { // Windows fake-root. return "/"; +#endif } else { // There could be a ':', too. Unlike the slash, let's include that // in the returned directory. @@ -185,8 +189,10 @@ bool Path::IsAbsolute() const { return true; else if (path_.front() == '/') return true; +#if PPSSPP_PLATFORM(WINDOWS) else if (path_.size() > 3 && path_[1] == ':') return true; // Windows path with drive letter +#endif else return false; }