Skip to content

Commit

Permalink
fix(utilities): filter on FileAttributes (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkopanski authored Nov 19, 2023
1 parent cf4c6c0 commit f8bdc96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Nuke.Utilities/IO/AbsolutePath.Children.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static IEnumerable<AbsolutePath> GetFiles(
return Enumerable.Empty<AbsolutePath>();

var files = Directory.EnumerateFiles(path, pattern, SearchOption.TopDirectoryOnly)
.Where(x => (File.GetAttributes(x) & attributes) == 0)
.Where(x => (File.GetAttributes(x) & attributes) == attributes)
.OrderBy(x => x)
.Select(AbsolutePath.Create);

Expand All @@ -50,7 +50,7 @@ public static IEnumerable<AbsolutePath> GetDirectories(
{
var matchingDirectories = paths
.SelectMany(x => Directory.EnumerateDirectories(x, pattern, SearchOption.TopDirectoryOnly))
.Where(x => (File.GetAttributes(x) & attributes) == 0)
.Where(x => (File.GetAttributes(x) & attributes) == attributes)
.OrderBy(x => x)
.Select(AbsolutePath.Create).ToList();

Expand Down

0 comments on commit f8bdc96

Please sign in to comment.