diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 598d79965f..16917e61ce 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 1.1.3 - 24.04.2015 +* Fix StackOverflowException when using local path - https://github.com/fsprojects/Paket/issues/795 + #### 1.1.2 - 24.04.2015 * `paket add` should not change dependencies file if the package is misspelled - https://github.com/fsprojects/Paket/issues/798 diff --git a/src/Paket.Core/NuGetV2.fs b/src/Paket.Core/NuGetV2.fs index 2e235e5023..981c1cc50f 100644 --- a/src/Paket.Core/NuGetV2.fs +++ b/src/Paket.Core/NuGetV2.fs @@ -320,7 +320,10 @@ let getDetailsFromLocalFile root localNugetPath package (version:SemVerInfo) = if not nupkg.Exists then failwithf "The package %s %s can't be found in %s.%sPlease check the feed definition in your paket.dependencies file." package (version.ToString()) di.FullName Environment.NewLine - let zip = ZipFile.OpenRead(nupkg.FullName) + + use zipToCreate = new FileStream(nupkg.FullName, FileMode.Open) + use zip = new ZipArchive(zipToCreate,ZipArchiveMode.Read) + let zippedNuspec = zip.Entries |> Seq.find (fun f -> f.FullName.EndsWith ".nuspec") let fileName = FileInfo(Path.Combine(Path.GetTempPath(), zippedNuspec.Name)).FullName diff --git a/src/Paket.Core/NupkgWriter.fs b/src/Paket.Core/NupkgWriter.fs index d43b9eedb9..e47109ace5 100644 --- a/src/Paket.Core/NupkgWriter.fs +++ b/src/Paket.Core/NupkgWriter.fs @@ -17,7 +17,7 @@ let contentTypeDoc fileList = let ns = XNamespace.Get "http://schemas.openxmlformats.org/package/2006/content-types" let root = XElement(ns + "Types") - let defaultNode extension contentType = + let defaultNode extension contentType = let def = XElement(ns + "Default") def.SetAttributeValue(XName.Get "Extension", extension) def.SetAttributeValue(XName.Get "ContentType", contentType)