Skip to content

Commit

Permalink
Fix StackOverflowException when using local path - fixes #795
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Apr 24, 2015
1 parent 6e46e48 commit c161d4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 4 additions & 1 deletion src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/NupkgWriter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c161d4b

Please sign in to comment.