Skip to content

Commit

Permalink
Merge pull request #4 from KirillOsenkov/master
Browse files Browse the repository at this point in the history
Searching in the drive root folder (e.g. "C:\") should result in path…
  • Loading branch information
JohnWintellect authored Jul 8, 2016
2 parents efa9765 + c8995f5 commit c145f2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions FF/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ internal static Int32 Main(String[] args)
Console.WriteLine(Constants.TotalMatchesFmt, totalMatches.ToString("N0", CultureInfo.CurrentCulture));
Console.WriteLine(Constants.TotalMatchesSizeFmt, totalMatchesSize.ToString("N0", CultureInfo.CurrentCulture));
}
}
}
else
{
returnValue = 1;
Expand Down Expand Up @@ -273,11 +273,11 @@ static private void RecurseFiles(String directory)
String lookUpdirectory = String.Empty;
if (directory.StartsWith(@"\\", StringComparison.OrdinalIgnoreCase))
{
lookUpdirectory += directory.Replace(@"\\", @"\\?\UNC\") + "\\*";
lookUpdirectory += directory.Replace(@"\\", @"\\?\UNC\") + "\\*";
}
else
{
lookUpdirectory = "\\\\?\\" + directory + "\\*";
lookUpdirectory = "\\\\?\\" + directory + "\\*";
}
NativeMethods.WIN32_FIND_DATA w32FindData;

Expand All @@ -304,7 +304,7 @@ static private void RecurseFiles(String directory)
{
Interlocked.Increment(ref totalDirectories);

String subDirectory = directory + "\\" + w32FindData.cFileName;
String subDirectory = Path.Combine(directory, w32FindData.cFileName);
if (Options.IncludeDirectories)
{
if (IsNameMatch(subDirectory))
Expand All @@ -319,7 +319,7 @@ static private void RecurseFiles(String directory)
}
else
{
// It's a file so look at it.
// It's a file so look at it.
Interlocked.Increment(ref totalFiles);

Int64 fileSize = w32FindData.nFileSizeLow + ((Int64)w32FindData.nFileSizeHigh << 32);
Expand Down

0 comments on commit c145f2a

Please sign in to comment.