Skip to content

Commit

Permalink
Create folder if needed during package extraction - fixes #1741
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jun 20, 2016
1 parent 8d2bbda commit 19923de
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@
#### 3.1.7 - 20.06.2016
* BUGFIX: Create folder if needed during package extraction - https://github.com/fsprojects/Paket/issues/1741

#### 3.1.6 - 19.06.2016
* BUGFIX: Simplify works with auto-detected target frameworks - https://github.com/fsprojects/Paket/pull/1740

Expand Down
9 changes: 7 additions & 2 deletions src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,14 @@ let rec private cleanup (dir : DirectoryInfo) =
else
cleanup sub
for file in dir.GetFiles() do

let newName = Uri.UnescapeDataString(file.Name)
if file.Name <> newName && not (File.Exists <| Path.Combine(file.DirectoryName, newName)) then
File.Move(file.FullName, Path.Combine(file.DirectoryName, newName))
let newFullName = Path.Combine(file.DirectoryName, newName)
if file.Name <> newName && not (File.Exists newFullName) then
if not file.Directory.Exists then
file.Directory.Create()

File.Move(file.FullName, newFullName)


/// Extracts the given package to the user folder
Expand Down

0 comments on commit 19923de

Please sign in to comment.