From 101c7f888f1b6dd2e0ecc181bc015ae5ee083058 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 10 Mar 2021 19:49:06 +0100 Subject: [PATCH] (Windows) Fixed an issue where a forward slash instead of a backslash was added to the ROM directory. --- es-app/src/FileData.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 7b82260e3..623790a26 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -171,8 +171,13 @@ const std::string FileData::getROMDirectory() // Expand home path if ~ is used. romDirPath = Utils::FileSystem::expandHomePath(romDirPath); + #if defined(_WIN64) + if (romDirPath.back() != '\\') + romDirPath = romDirPath + "\\"; + #else if (romDirPath.back() != '/') romDirPath = romDirPath + "/"; + #endif } // If %ESPATH% is used for the ROM path configuration, then expand it to the executable