From 514bdaa19fc774d6ce33c52a6ecc3312e1b636af Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Wed, 3 Dec 2014 16:35:52 +0100 Subject: [PATCH] Apply BindingRedirects much faster --- src/Paket.Core/BindingRedirects.fs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Paket.Core/BindingRedirects.fs b/src/Paket.Core/BindingRedirects.fs index 5cdb1087af..b94e6738d2 100644 --- a/src/Paket.Core/BindingRedirects.fs +++ b/src/Paket.Core/BindingRedirects.fs @@ -79,10 +79,8 @@ let private applyBindingRedirects bindingRedirects (configFilePath:string) = /// Applies a set of binding redirects to all .config files in a specific folder. let applyBindingRedirectsToFolder rootPath bindingRedirects = - let getFiles searchPattern = Directory.GetFiles(rootPath, searchPattern, SearchOption.AllDirectories) |> List.ofArray - - getFiles "web.config" @ - getFiles "app.config" + Directory.GetFiles(rootPath, "*.config", SearchOption.AllDirectories) + |> Seq.filter (fun x -> x.EndsWith "web.config" || x.EndsWith "app.config") |> Seq.iter (applyBindingRedirects bindingRedirects) /// Calculates the short form of the public key token for use with binding redirects, if it exists.