Log: Allow read-only access to the log file (#3409)

This commit is contained in:
KamFretoZ 2025-04-26 10:03:39 +07:00 committed by GitHub
parent 611bb8fb4f
commit d049b36387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -505,7 +505,7 @@ void Log::SetFileOutputParams(bool enabled, const char* filename, bool timestamp
if (enabled) if (enabled)
{ {
s_state.file_handle = FileSystem::OpenManagedCFile(filename, "wb"); s_state.file_handle = FileSystem::OpenManagedSharedCFile(filename, "wb", FileSystem::FileShareMode::DenyWrite);
if (!s_state.file_handle) [[unlikely]] if (!s_state.file_handle) [[unlikely]]
{ {
ExecuteCallbacks(PackCategory(Channel::Log, Level::Error, Color::Default), nullptr, ExecuteCallbacks(PackCategory(Channel::Log, Level::Error, Color::Default), nullptr,