Add file length check on MergeDiff

This commit is contained in:
Matt Nadareski
2016-05-17 10:46:49 -07:00
parent 17a2480f03
commit c1c9072649

View File

@@ -1530,12 +1530,26 @@ Make a selection:
{ {
foreach (string file in Directory.EnumerateFiles(input.Replace("\"", ""), "*", SearchOption.AllDirectories)) foreach (string file in Directory.EnumerateFiles(input.Replace("\"", ""), "*", SearchOption.AllDirectories))
{ {
newInputs.Add(Path.GetFullPath(file)); try
{
newInputs.Add(Path.GetFullPath(file));
}
catch (PathTooLongException)
{
logger.Warning("The path for " + file + " was too long");
}
} }
} }
else if (File.Exists(input.Replace("\"", ""))) else if (File.Exists(input.Replace("\"", "")))
{ {
newInputs.Add(Path.GetFullPath(input.Replace("\"", ""))); try
{
newInputs.Add(Path.GetFullPath(input.Replace("\"", "")));
}
catch (PathTooLongException)
{
logger.Warning("The path for " + input.Replace("\"", "") + " was too long");
}
} }
} }