aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/file.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 7fe2e1b655..4a7aed0e3d 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -172,7 +172,7 @@ static FILE *fopenNoCase(const String &filename, const String &directory, const
//
if (!file) {
fileBuf.toUppercase();
- pathBuf += fileBuf;
+ pathBuf = dirBuf + fileBuf;
file = fopen(pathBuf.c_str(), mode);
}
@@ -181,7 +181,7 @@ static FILE *fopenNoCase(const String &filename, const String &directory, const
//
if (!file) {
fileBuf.toLowercase();
- pathBuf += fileBuf;
+ pathBuf = dirBuf + fileBuf;
file = fopen(pathBuf.c_str(), mode);
}
@@ -191,7 +191,7 @@ static FILE *fopenNoCase(const String &filename, const String &directory, const
if (!file) {
fileBuf.toLowercase();
fileBuf.setChar(toupper(fileBuf[0]),0);
- pathBuf += fileBuf;
+ pathBuf = dirBuf + fileBuf;
file = fopen(pathBuf.c_str(), mode);
}