Skip to content

Commit

Permalink
Fix PathTooLongException exception during build
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpodhola committed Sep 17, 2015
1 parent 7839481 commit 93b6490
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/FakeLib/Globbing/Globbing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ let rec private buildPaths acc (input : SearchOption list) =
Seq.collect (fun dir ->
if Directory.Exists(Path.Combine(dir, pattern))
then seq { yield Path.Combine(dir, pattern) }
else Directory.EnumerateFiles(dir, pattern)) acc |> Seq.toList
else
try
Directory.EnumerateFiles(dir, pattern)
with
| :? System.IO.PathTooLongException as ex -> Array.toSeq [| |]
) acc |> Seq.toList

let private isDrive =
let regex = Regex(@"^[A-Za-z]:$", RegexOptions.Compiled)
Expand Down

0 comments on commit 93b6490

Please sign in to comment.