From c6b5d969066b58498101f248dec9a998c877ee4e Mon Sep 17 00:00:00 2001 From: Pengfei Date: Sat, 11 Sep 2021 08:36:24 +0800 Subject: [PATCH] Try fix log path for macos --- src/common/logging/log.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/logging/log.cpp b/src/common/logging/log.cpp index 3b8aee0..1517253 100644 --- a/src/common/logging/log.cpp +++ b/src/common/logging/log.cpp @@ -25,6 +25,8 @@ std::uint64_t GetLoggingTime() { #ifdef __WIN32 // _SH_DENYWR allows read-only access for other programs. static FileUtil::IOFile g_log_file{FileUtil::GetExeDirectory() + DIR_SEP LOG_FILE, "w", _SH_DENYWR}; +#elif __APPLE__ +static FileUtil::IOFile g_log_file{FileUtil::GetBundleDirectory() + "/../" LOG_FILE, "w"}; #else static FileUtil::IOFile g_log_file{ROOT_DIR DIR_SEP LOG_FILE, "w"}; #endif