summaryrefslogtreecommitdiffstats
path: root/src/frontend_common/config.cpp
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2023-11-19 18:24:43 +0100
committert895 <clombardo169@gmail.com>2023-11-21 07:58:13 +0100
commitf3fe362c93efff124c4ef0a005cdcd1cd635f8f5 (patch)
tree15f8bc2c39e262ced734497b54d349b5efaf60cb /src/frontend_common/config.cpp
parentfrontend_common: Disable UTF-8 BOM in config (diff)
downloadyuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.tar
yuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.tar.gz
yuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.tar.bz2
yuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.tar.lz
yuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.tar.xz
yuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.tar.zst
yuzu-f3fe362c93efff124c4ef0a005cdcd1cd635f8f5.zip
Diffstat (limited to 'src/frontend_common/config.cpp')
-rw-r--r--src/frontend_common/config.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp
index 8eb62e8ef..b3f4a54a4 100644
--- a/src/frontend_common/config.cpp
+++ b/src/frontend_common/config.cpp
@@ -856,7 +856,15 @@ std::string Config::AdjustKey(const std::string& key) {
std::string Config::AdjustOutputString(const std::string& string) {
std::string adjusted_string(string);
boost::replace_all(adjusted_string, "\\", "/");
- boost::replace_all(adjusted_string, "//", "/");
+
+ // Windows requires that two forward slashes are used at the start of a path for unmapped
+ // network drives so we have to watch for that here
+ if (string.substr(0, 2) == "//") {
+ boost::replace_all(adjusted_string, "//", "/");
+ adjusted_string.insert(0, "/");
+ } else {
+ boost::replace_all(adjusted_string, "//", "/");
+ }
// Needed for backwards compatibility with QSettings deserialization
for (const auto& special_character : special_characters) {