Skip to content

Commit

Permalink
Support local read-only .nupkg-files
Browse files Browse the repository at this point in the history
Setting a nuget package read-only made getDetailsFromLocalFile miss the file. because the file was opened with write access.
  • Loading branch information
Karamell committed Dec 1, 2015
1 parent 059d2e8 commit 1116ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1116ff0

Please sign in to comment.