Skip to content

Commit

Permalink
FindAllFiles should handle paths that are longer than 260 characters …
Browse files Browse the repository at this point in the history
…- references #949
  • Loading branch information
forki committed Jul 31, 2015
1 parent 06454dc commit ea76628
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#### 1.22.0-alpha004 - 31.07.2015
#### 1.22.0-alpha005 - 31.07.2015
* Use FSharp.Core 4.0
* Fix build exe path which includes whitespace - https://github.com/fsprojects/ProjectScaffold/pull/185
* Preserve encoding upon saving solution - https://github.com/fsprojects/Paket/pull/940
* BUGFIX: If we specify a templatefile in paket pack it still packs all templates - https://github.com/fsprojects/Paket/pull/944
* BUGFIX: If we specify a type project templatefile in paket pack it should find the project - https://github.com/fsprojects/Paket/issues/945
* BUGFIX: Paket pack succeeded even when there're missing files - https://github.com/fsprojects/Paket/issues/948
* BUGFIX: FindAllFiles should handle paths that are longer than 260 characters - https://github.com/fsprojects/Paket/issues/949

#### 1.21.0 - 23.07.2015
* Allow NuGet packages to put version in the path - https://github.com/fsprojects/Paket/pull/928
Expand Down
13 changes: 8 additions & 5 deletions src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ type ProjectFile =
static member FindAllProjects(folder) =
let FindAllFiles(folder, pattern) =
let rec search (di:DirectoryInfo) =
let files = di.GetFiles(pattern, SearchOption.TopDirectoryOnly)
di.GetDirectories()
|> Array.filter (fun di -> Path.Combine(di.FullName, Constants.DependenciesFileName) |> File.Exists |> not)
|> Array.collect search
|> Array.append files
try
let files = di.GetFiles(pattern, SearchOption.TopDirectoryOnly)
di.GetDirectories()
|> Array.filter (fun di -> try Path.Combine(di.FullName, Constants.DependenciesFileName) |> File.Exists |> not with | _ -> false)
|> Array.collect search
|> Array.append files
with
| _ -> Array.empty

search <| DirectoryInfo folder

Expand Down

0 comments on commit ea76628

Please sign in to comment.