mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add file length check on MergeDiff
This commit is contained in:
@@ -1529,14 +1529,28 @@ Make a selection:
|
|||||||
if (Directory.Exists(input.Replace("\"", "")))
|
if (Directory.Exists(input.Replace("\"", "")))
|
||||||
{
|
{
|
||||||
foreach (string file in Directory.EnumerateFiles(input.Replace("\"", ""), "*", SearchOption.AllDirectories))
|
foreach (string file in Directory.EnumerateFiles(input.Replace("\"", ""), "*", SearchOption.AllDirectories))
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
newInputs.Add(Path.GetFullPath(file));
|
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("\"", "")))
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
newInputs.Add(Path.GetFullPath(input.Replace("\"", "")));
|
newInputs.Add(Path.GetFullPath(input.Replace("\"", "")));
|
||||||
}
|
}
|
||||||
|
catch (PathTooLongException)
|
||||||
|
{
|
||||||
|
logger.Warning("The path for " + input.Replace("\"", "") + " was too long");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MergeDiff md = new MergeDiff(newInputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, logger);
|
MergeDiff md = new MergeDiff(newInputs, name, desc, cat, version, author, diff, dedup, bare, forceunpack, old, logger);
|
||||||
|
|||||||
Reference in New Issue
Block a user