Fix the swr file logic

It was supposed to be && and not || to avoid copying those files
This commit is contained in:
Marc Paine 2023-04-21 10:14:05 -07:00 committed by GitHub
parent 6171509864
commit a4ec49fae3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ namespace Microsoft.DotNet.Cli.Build
{ {
string sourceFolder = Path.Combine(MSBuildExtensionsLayoutDirectory, relativeSourcePath); string sourceFolder = Path.Combine(MSBuildExtensionsLayoutDirectory, relativeSourcePath);
var files = Directory.GetFiles(sourceFolder) var files = Directory.GetFiles(sourceFolder)
.Where(f => !Path.GetExtension(f).Equals(".pdb", StringComparison.OrdinalIgnoreCase) || !Path.GetExtension(f).Equals(".swr", StringComparison.OrdinalIgnoreCase)) .Where(f => !Path.GetExtension(f).Equals(".pdb", StringComparison.OrdinalIgnoreCase) && !Path.GetExtension(f).Equals(".swr", StringComparison.OrdinalIgnoreCase))
.ToList(); .ToList();
if (files.Any(f => !Path.GetFileName(f).Equals("_._"))) if (files.Any(f => !Path.GetFileName(f).Equals("_._")))
{ {