Skip to content

Commit

Permalink
Don't lock files in the bootstrapper that we are only reading
Browse files Browse the repository at this point in the history
Create lot of bugs when the bootstrapper is executed in parallel
(like for dotnet restore)
  • Loading branch information
vbfox committed Dec 12, 2017
1 parent 5f22c63 commit 79157ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Paket.Bootstrapper/HelperProxies/FileSystemProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ private static Stream WaitForFileOpen(string path, FileMode filemode, FileAccess
{
try
{
return File.Open(path, filemode, fileAccess, FileShare.None);
var readOnly = fileAccess == FileAccess.Read;
return File.Open(path, filemode, fileAccess, readOnly ? FileShare.Read : FileShare.None);
}
catch (Exception exception)
{
Expand Down

0 comments on commit 79157ae

Please sign in to comment.