Skip to content

Commit

Permalink
Merge pull request #18 from 7702244/dev
Browse files Browse the repository at this point in the history
Set Zip FileShare.Read
  • Loading branch information
7702244 authored Feb 23, 2023
2 parents a23b512 + bb5a50c commit eaba243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MAOToolkit/Extensions/ZipArchiveExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void CreateEntryFromAny(this ZipArchive archive, string sourcePath
var entry = archive.CreateEntry(Path.Combine(entryName, fileName), CompressionLevel.Optimal);
entry.LastWriteTime = File.GetLastWriteTime(sourcePath);

using (var fileStream = new FileStream(sourcePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
using (var fileStream = new FileStream(sourcePath, FileMode.Open, FileAccess.Read, FileShare.Read))
using (var entryStream = entry.Open())
{
fileStream.CopyTo(entryStream);
Expand Down

0 comments on commit eaba243

Please sign in to comment.