Skip to content

Commit

Permalink
One last Linq place (not all of them)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed Nov 16, 2024
1 parent ae7111e commit a5f9006
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions BinaryObjectScanner/Scanner.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Data;
using BinaryObjectScanner.FileType;
using BinaryObjectScanner.Interfaces;
Expand Down Expand Up @@ -100,7 +99,7 @@ public ProtectionDictionary GetProtections(List<string>? paths)
if (Directory.Exists(path))
{
// Enumerate all files at first for easier access
var files = IOExtensions.SafeGetFiles(path, "*", SearchOption.AllDirectories).ToList();
List<string> files = [.. IOExtensions.SafeGetFiles(path, "*", SearchOption.AllDirectories)];

// Scan for path-detectable protections
if (_options.ScanPaths)
Expand All @@ -113,7 +112,7 @@ public ProtectionDictionary GetProtections(List<string>? paths)
for (int i = 0; i < files.Count; i++)
{
// Get the current file
string file = files.ElementAt(i);
string file = files[i];

// Get the reportable file name
string reportableFileName = file;
Expand Down

0 comments on commit a5f9006

Please sign in to comment.