mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
fix: should still ignore non-PE files when signExclude is provided
This commit is contained in:
@@ -25,7 +25,8 @@ public class WindowsPackCommandRunner : PackageBuilder<WindowsPackOptions>
|
|||||||
{
|
{
|
||||||
Regex fileExcludeRegex = Options.SignExclude != null ? new Regex(Options.SignExclude) : null;
|
Regex fileExcludeRegex = Options.SignExclude != null ? new Regex(Options.SignExclude) : null;
|
||||||
var filesToSign = new DirectoryInfo(packDir).GetAllFilesRecursively()
|
var filesToSign = new DirectoryInfo(packDir).GetAllFilesRecursively()
|
||||||
.Where(x => !fileExcludeRegex?.IsMatch(x.FullName) ?? PathUtil.FileIsLikelyPEImage(x.Name))
|
.Where(x => PathUtil.FileIsLikelyPEImage(x.Name))
|
||||||
|
.Where(x => fileExcludeRegex != null ? !fileExcludeRegex.IsMatch(x.FullName) : true)
|
||||||
.Select(x => x.FullName)
|
.Select(x => x.FullName)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user