dpsenner commented on a change in pull request #48: Fixes LOG4NET-587 Mutex ~
UnauthorizedAccessException Access to the path is denied
URL: https://github.com/apache/logging-log4net/pull/48#discussion_r287298895
##########
File path: src/Appender/RollingFileAppender.cs
##########
@@ -1147,8 +1148,20 @@ override public void ActivateOptions()
}
#if !NETCF
- // initialize the mutex that is used to lock rolling
- m_mutexForRolling = new Mutex(false,
m_baseFileName.Replace("\\", "_").Replace(":", "_").Replace("/", "_"));
+ if (m_mutexForRolling == null)
+ {
+ // initialize the mutex that is used to lock
rolling
+ string mutexFriendlyFilename =
m_baseFileName.Replace("\\", "_").Replace(":", "_").Replace("/", "_");
Review comment:
Could this dark magic be moved into the `SafeCreateMutex()`, such that it
exists only once?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services