diff --git a/.gitignore b/.gitignore index fb65cb075..36ef9ac31 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ local.properties ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +.vs # User-specific files *.suo diff --git a/src/Squirrel.nuspec b/src/Squirrel.nuspec index b31641dde..ce6c92893 100644 --- a/src/Squirrel.nuspec +++ b/src/Squirrel.nuspec @@ -1,7 +1,7 @@  - 1.8.0 + 1.8.1 GitHub Paul Betts https://github.com/squirrel/Squirrel.Windows/blob/master/COPYING diff --git a/src/Squirrel/Utility.cs b/src/Squirrel/Utility.cs index 5e683d423..34f06fe12 100644 --- a/src/Squirrel/Utility.cs +++ b/src/Squirrel/Utility.cs @@ -74,7 +74,14 @@ public static IEnumerable GetAllFilesRecursively(this DirectoryInfo ro { Contract.Requires(rootPath != null); - return rootPath.EnumerateFiles("*", SearchOption.AllDirectories); + return rootPath.GetAllFilesRecursively("*"); + } + + public static IEnumerable GetAllFilesRecursively(this DirectoryInfo rootPath, string searchPattern) + { + Contract.Requires(rootPath != null); + + return rootPath.EnumerateFiles(searchPattern, SearchOption.AllDirectories); } public static IEnumerable GetAllFilePathsRecursively(string rootPath) diff --git a/src/Update/Program.cs b/src/Update/Program.cs index f87ab691b..33c793b6a 100644 --- a/src/Update/Program.cs +++ b/src/Update/Program.cs @@ -392,13 +392,15 @@ public void Releasify(string package, string targetDir = null, string packagesDi var rp = new ReleasePackage(file.FullName); rp.CreateReleasePackage(Path.Combine(di.FullName, rp.SuggestedReleaseFileName), packagesDir, contentsPostProcessHook: pkgPath => { - new DirectoryInfo(pkgPath).GetAllFilesRecursively() - .Where(x => x.Name.ToLowerInvariant().EndsWith(".exe")) - .Where(x => !x.Name.ToLowerInvariant().Contains("squirrel.exe")) - .Where(x => Utility.IsFileTopLevelInPackage(x.FullName, pkgPath)) - .Where(x => Utility.ExecutableUsesWin32Subsystem(x.FullName)) - .ForEachAsync(x => createExecutableStubForExe(x.FullName)) - .Wait(); + var exeFiles = new DirectoryInfo(pkgPath) + .GetAllFilesRecursively("*.exe") + .Where(x => !x.Name.ToLowerInvariant().Contains("squirrel.exe")) + .Where(x => Utility.IsFileTopLevelInPackage(x.FullName, pkgPath)) + .Where(x => Utility.ExecutableUsesWin32Subsystem(x.FullName)) + .ToList(); + + exeFiles.ForEachAsync(x => createExecutableStubForExe(x.FullName)) + .Wait(); if (signingOpts == null) return;