Cleanup + Small TimeZoneInfo optimization for Unix (dotnet/corert#5314)
authorJan Kotas <jkotas@microsoft.com>
Tue, 30 Jan 2018 09:11:03 +0000 (01:11 -0800)
committerStephen Toub <stoub@microsoft.com>
Tue, 30 Jan 2018 14:00:23 +0000 (09:00 -0500)
* Delete non-shared TimeZoneInfo.cs
* Delete duplicate resource

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/mscorlib/shared/System/TimeZoneInfo.Unix.cs

index 2f7830f..a06545f 100644 (file)
@@ -525,7 +525,8 @@ namespace System
         {
             try
             {
-                using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
+                // bufferSize == 1 used to avoid unnecessary buffer in FileStream
+                using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize: 1))
                 {
                     if (stream.Length == rawData.Length)
                     {