summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/File.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-10 21:27:57 +0200
committerMattes D <github@xoft.cz>2014-05-10 21:27:57 +0200
commit28815252e6ff086c0fab7cf56be4839f3d8612a3 (patch)
tree4532e85cbcc873a2616147713e9f899ecf84d111 /src/OSSupport/File.cpp
parentClient cert is not requested. (diff)
parentMerge pull request #993 from mc-server/GridStructGen (diff)
downloadcuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.gz
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.bz2
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.lz
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.xz
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.zst
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.zip
Diffstat (limited to 'src/OSSupport/File.cpp')
-rw-r--r--src/OSSupport/File.cpp4
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