Explorar o código

* LocalFileEventLog.cs: When event log store does not exist, then we
do not need to perform a case-insensitive lookup of the log name.

svn path=/trunk/mcs/; revision=64360

Gert Driesen %!s(int64=19) %!d(string=hai) anos
pai
achega
5ef12d3cb1

+ 5 - 0
mcs/class/System/System.Diagnostics/ChangeLog

@@ -1,3 +1,8 @@
+2006-08-25  Gert Driesen  <[email protected]>
+
+	* LocalFileEventLog.cs: When event log store does not exist, then we
+	do not need to perform a case-insensitive lookup of the log name.
+
 2006-08-20  Gert Driesen  <[email protected]>
 
 	* EventLog.cs: Removed namespace import.

+ 5 - 0
mcs/class/System/System.Diagnostics/LocalFileEventLog.cs

@@ -292,6 +292,11 @@ namespace System.Diagnostics
 		}
 
 		private string FindLogStore (string logName) {
+			// when the event log store does not yet exist, there's no need
+			// to perform a case-insensitive lookup
+			if (!Directory.Exists (EventLogStore))
+				return Path.Combine (EventLogStore, logName);
+
 			// we'll use a case-insensitive lookup to match the MS behaviour
 			// while still allowing the original casing of the log name to be
 			// retained