Skip to content

Commit

Permalink
Don't enumerate all files, since we only need lib files - references #…
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jan 2, 2015
1 parent 277560f commit 10f19e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 0.20.20 - 02.01.2015
* PERFORMANCE: Don't enumerate all files, since we only need lib files - https://github.com/fsprojects/Paket/issues/487

#### 0.20.19 - 02.01.2015
* PERFORMANCE: Pin sourcefile dependencies - https://github.com/fsprojects/Paket/issues/487

Expand Down
7 changes: 4 additions & 3 deletions src/Paket.Core/NuGetV2.fs
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,11 @@ let DownloadPackage(root, auth, url, name, version:SemVerInfo, force) =
let GetLibFiles(targetFolder) =
let libs =
let dir = DirectoryInfo(targetFolder)
let libPath = dir.FullName.ToLower() + Path.DirectorySeparatorChar.ToString() + "lib" + Path.DirectorySeparatorChar.ToString()
let libPath = dir.FullName.ToLower() + Path.DirectorySeparatorChar.ToString() + "lib"
if dir.Exists then
dir.GetFiles("*.*",SearchOption.AllDirectories)
|> Array.filter (fun fi -> fi.FullName.ToLower().Contains(libPath))
dir.GetDirectories()
|> Array.filter (fun fi -> fi.FullName.ToLower() = libPath)
|> Array.collect (fun dir -> dir.GetFiles("*.*",SearchOption.AllDirectories))
else
Array.empty

Expand Down

0 comments on commit 10f19e2

Please sign in to comment.