summaryrefslogtreecommitdiff
path: root/Source/Core/Common/File.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/File.cpp')
-rw-r--r--Source/Core/Common/File.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/File.cpp b/Source/Core/Common/File.cpp
index 361943b93e..f3ede54fc2 100644
--- a/Source/Core/Common/File.cpp
+++ b/Source/Core/Common/File.cpp
@@ -60,12 +60,12 @@ bool IOFile::Open(const std::string& filename, const char openmode[])
{
Close();
#ifdef _WIN32
- _tfopen_s(&m_file, UTF8ToTStr(filename).c_str(), UTF8ToTStr(openmode).c_str());
+ m_good = _tfopen_s(&m_file, UTF8ToTStr(filename).c_str(), UTF8ToTStr(openmode).c_str()) == 0;
#else
- m_file = fopen(filename.c_str(), openmode);
+ m_file = std::fopen(filename.c_str(), openmode);
+ m_good = m_file != nullptr;
#endif
- m_good = IsOpen();
return m_good;
}