Skip to content

Commit b0bdb6b

Browse files
No longer crashing on long filenames
1 parent b3a6bc5 commit b0bdb6b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

FF/FastFindArgumentParser.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ protected override SwitchStatus OnDoneParse()
287287
/// </returns>
288288
private SwitchStatus TestPath(String pathToTest)
289289
{
290-
SwitchStatus ss = SwitchStatus.Error;
290+
// Assume good.
291+
SwitchStatus ss = SwitchStatus.NoError;
291292
if (false == String.IsNullOrEmpty(this.Path))
292293
{
293294
this.errorMessage = Constants.PathMultipleSwitches;

FF/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ private static void RecurseFiles(String directory)
226226
// the caller doesn't have access to but it seems like overkill
227227
// and noise.
228228
}
229+
catch (PathTooLongException)
230+
{
231+
// Not much I can do here. The BCL methods do not support the \\?\c:\ format
232+
// like the raw Win32 API. I guess I could thunk down and do this on my own by
233+
// pInvoke.
234+
}
229235
}
230236
}
231237
}

0 commit comments

Comments
 (0)