[RombaSharp] Fix and verify Build

This commit is contained in:
Matt Nadareski
2018-02-09 20:36:39 -08:00
parent 1db8874b0c
commit 183e5ccad8
2 changed files with 14 additions and 10 deletions

View File

@@ -207,7 +207,6 @@ namespace RombaSharp
/// <param name="copy">True if files should be copied to output, false for rebuild</param> /// <param name="copy">True if files should be copied to output, false for rebuild</param>
/// <param name="workers">How many workers to launch for the job, default from config</param> /// <param name="workers">How many workers to launch for the job, default from config</param>
/// <param name="subworkers">How many subworkers to launch for each worker, default from config</param> /// <param name="subworkers">How many subworkers to launch for each worker, default from config</param>
/// TODO: Verify implementation
private static void InitBuild( private static void InitBuild(
List<string> inputs, List<string> inputs,
string outdat, string outdat,

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using SabreTools.Library.Data; using SabreTools.Library.Data;
using SabreTools.Library.Help; using SabreTools.Library.Help;
@@ -164,17 +165,21 @@ namespace RombaSharp
// Verify that the current flag is proper for the feature // Verify that the current flag is proper for the feature
if (!_help[feature].ValidateInput(args[i])) if (!_help[feature].ValidateInput(args[i]))
{ {
Globals.Logger.Error("Invalid input detected: {0}", args[i]); // Special cases for files
_help.OutputIndividualFeature(feature); List<string> temp = new List<string>();
Globals.Logger.Close(); temp.Add(args[i]);
return; if (!File.Exists(args[i])
&& !Directory.Exists(args[i])
&& GetValidDats(temp).Count == 0)
{
Globals.Logger.Error("Invalid input detected: {0}", args[i]);
_help.OutputIndividualFeature(feature);
Globals.Logger.Close();
return;
}
} }
// Special precautions for files and directories inputs.Add(args[i]);
if (File.Exists(args[i]) || Directory.Exists(args[i]))
{
inputs.Add(args[i]);
}
} }
// Now loop through all inputs // Now loop through all inputs