From 1116ff03d870f9ade0ac321f8bb20a80d1e191c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Rolstad=20Henriksen?= Date: Tue, 1 Dec 2015 13:12:57 +0100 Subject: [PATCH] Support local read-only .nupkg-files Setting a nuget package read-only made getDetailsFromLocalFile miss the file. because the file was opened with write access. --- src/Paket.Core/NuGetV2.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paket.Core/NuGetV2.fs b/src/Paket.Core/NuGetV2.fs index d4281c644e..8ad0614b69 100644 --- a/src/Paket.Core/NuGetV2.fs +++ b/src/Paket.Core/NuGetV2.fs @@ -305,7 +305,7 @@ let getDetailsFromLocalFile root localNugetPath (packageName:PackageName) (versi let nupkg = findLocalPackage di.FullName packageName version fixArchive nupkg.FullName - use zipToCreate = new FileStream(nupkg.FullName, FileMode.Open) + use zipToCreate = new FileStream(nupkg.FullName, FileMode.Open, FileAccess.Read) use zip = new ZipArchive(zipToCreate,ZipArchiveMode.Read) let zippedNuspec = zip.Entries |> Seq.find (fun f -> f.FullName.EndsWith ".nuspec")