From d45bf0689a97c600d1c4cc6c66d2f26eac8b7512 Mon Sep 17 00:00:00 2001 From: BearOso Date: Wed, 15 Mar 2023 16:26:45 -0500 Subject: [PATCH] win32: Fix bug with multiple drive paths. --- fscompat.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fscompat.cpp b/fscompat.cpp index 6adfbca0..752d50e0 100644 --- a/fscompat.cpp +++ b/fscompat.cpp @@ -139,9 +139,12 @@ string makepath(const string &drive, const string &dir, const string &stem, cons if (!drive.empty()) { - output += drive + ":"; - if (!dir.empty() && dir[0] != SLASH_CHAR) - output += SLASH_CHAR; + if (!(dir.length() > 2 && dir[1] == ':')) + { + output += drive + ":"; + if (!dir.empty() && dir[0] != SLASH_CHAR) + output += SLASH_CHAR; + } } if (!dir.empty())