From 39492436ec835b20389336ef26ae501e31a76eeb Mon Sep 17 00:00:00 2001 From: eruiz Date: Thu, 23 Aug 2018 12:20:26 -0300 Subject: [PATCH] WIN32: Don't deny access to file sinks from other processes --- include/spdlog/details/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h index d7f7430f..7ee42542 100644 --- a/include/spdlog/details/os.h +++ b/include/spdlog/details/os.h @@ -159,9 +159,9 @@ inline bool fopen_s(FILE **fp, const filename_t &filename, const filename_t &mod { #ifdef _WIN32 #ifdef SPDLOG_WCHAR_FILENAMES - *fp = _wfsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); + *fp = _wfsopen((filename.c_str()), mode.c_str(), _SH_DENYNO); #else - *fp = _fsopen((filename.c_str()), mode.c_str(), _SH_DENYWR); + *fp = _fsopen((filename.c_str()), mode.c_str(), _SH_DENYNO); #endif #else // unix *fp = fopen((filename.c_str()), mode.c_str());