Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ashton <joshua@froggi.es>2021-06-04 20:41:29 +0300
committerJoshua Ashton <joshua@froggi.es>2021-06-04 20:41:54 +0300
commit36585fc5e059551c1ff8c42c953371a2e9acd897 (patch)
treed410d5a898b771d4d6f61dea498b036bc4fbce69
parent99a78052da8c35c85906908fcf887b7ff8a1b654 (diff)
[util] Handle casing correctly in finding log namelower-case-cache
Otherwise any game that has a .EXE instead of a .exe or some other casing variant will generate an incorrect log name. Closes: #2079
-rw-r--r--src/util/log/log.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/log/log.cpp b/src/util/log/log.cpp
index a64a0c31..a8c1198e 100644
--- a/src/util/log/log.cpp
+++ b/src/util/log/log.cpp
@@ -2,6 +2,8 @@
#include "../util_env.h"
+#include <cctype>
+
namespace dxvk {
Logger::Logger(const std::string& file_name)
@@ -101,6 +103,8 @@ namespace dxvk {
path += '/';
std::string exeName = env::getExeName();
+ std::transform(exeName.begin(), exeName.end(), exeName.begin(), std::tolower);
+
auto extp = exeName.find_last_of('.');
if (extp != std::string::npos && exeName.substr(extp + 1) == "exe")