summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-12-07 10:04:55 +0100
committerGitHub <noreply@github.com>2017-12-07 10:04:55 +0100
commitecf30cfc749ff49697c8b6bf24efae4202a2bf61 (patch)
tree012b7fce3de5c5ae23e1c0619d9cbd06024c6766 /Source/Core/Common
parent9d246800c2a9baea00b643e2f48bf213a8834a30 (diff)
parent9d8a82e1d9d945d68b17adab1aff34c96aeda003 (diff)
Merge pull request #6240 from JosJuice/stream-path-encoding
Don't use wrong encoding for paths when opening streams on Windows
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/ArmCPUDetect.cpp4
-rw-r--r--Source/Core/Common/LinearDiskCache.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/Common/ArmCPUDetect.cpp b/Source/Core/Common/ArmCPUDetect.cpp
index 382983db6f..9c85835c07 100644
--- a/Source/Core/Common/ArmCPUDetect.cpp
+++ b/Source/Core/Common/ArmCPUDetect.cpp
@@ -12,6 +12,7 @@
#include "Common/CPUDetect.h"
#include "Common/CommonTypes.h"
+#include "Common/FileUtil.h"
#include "Common/StringUtil.h"
const char procfile[] = "/proc/cpuinfo";
@@ -22,7 +23,8 @@ static std::string GetCPUString()
std::string cpu_string = "Unknown";
std::string line;
- std::ifstream file(procfile);
+ std::ifstream file;
+ File::OpenFStream(file, procfile, std::ios_base::in);
if (!file)
return cpu_string;
diff --git a/Source/Core/Common/LinearDiskCache.h b/Source/Core/Common/LinearDiskCache.h
index fae1dfc3f5..e97f23a11f 100644
--- a/Source/Core/Common/LinearDiskCache.h
+++ b/Source/Core/Common/LinearDiskCache.h
@@ -124,7 +124,7 @@ public:
// failed to open file for reading or bad header
// close and recreate file
Close();
- m_file.open(filename, ios_base::out | ios_base::trunc | ios_base::binary);
+ File::OpenFStream(m_file, filename, ios_base::out | ios_base::trunc | ios_base::binary);
WriteHeader();
return 0;
}