diff options
author | madmaxoft <github@xoft.cz> | 2014-05-02 20:55:50 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-05-02 20:55:50 +0200 |
commit | 92c022c1405d32fa851a06958a55ea714c62eccf (patch) | |
tree | 2e8bca0f65046038cf1d8d131658e4c854bc2784 | |
parent | Fixed MagmaCube spawning. (diff) | |
download | cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.tar cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.tar.gz cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.tar.bz2 cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.tar.lz cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.tar.xz cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.tar.zst cuberite-92c022c1405d32fa851a06958a55ea714c62eccf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/File.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index 33b9cfc3f..8c24fa541 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -75,7 +75,7 @@ bool cFile::Open(const AString & iFileName, eMode iMode) } #ifdef _WIN32 - fopen_s(&m_File, (FILE_IO_PREFIX + iFileName).c_str(), Mode); + m_File = _fsopen((FILE_IO_PREFIX + iFileName).c_str(), Mode, _SH_DENYWR); #else m_File = fopen((FILE_IO_PREFIX + iFileName).c_str(), Mode); #endif // _WIN32 @@ -88,7 +88,7 @@ bool cFile::Open(const AString & iFileName, eMode iMode) // Simply re-open for read-writing, erasing existing contents: #ifdef _WIN32 - fopen_s(&m_File, (FILE_IO_PREFIX + iFileName).c_str(), "wb+"); + m_File = _fsopen((FILE_IO_PREFIX + iFileName).c_str(), "wb+", _SH_DENYWR); #else m_File = fopen((FILE_IO_PREFIX + iFileName).c_str(), "wb+"); #endif // _WIN32 |