mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] Code cleanup, merge DFD and DFDP flags
This commit is contained in:
@@ -81,7 +81,6 @@ namespace SabreTools
|
||||
bare = false,
|
||||
clean = false,
|
||||
datfromdir = false,
|
||||
datfromdirparallel = false,
|
||||
datprefix = false,
|
||||
dedup = false,
|
||||
enableGzip = false,
|
||||
@@ -238,11 +237,6 @@ namespace SabreTools
|
||||
case "--diff-nd":
|
||||
diffMode |= DiffMode.NoDupes;
|
||||
break;
|
||||
case "-dp":
|
||||
case "--d2dp":
|
||||
case "--dfdp":
|
||||
datfromdirparallel = true;
|
||||
break;
|
||||
case "-es":
|
||||
case "--ext-split":
|
||||
extsplit = true;
|
||||
@@ -624,7 +618,7 @@ namespace SabreTools
|
||||
}
|
||||
|
||||
// If more than one switch is enabled, show the help screen
|
||||
if (!(add ^ datfromdir ^ datfromdirparallel ^ extsplit ^ generate ^ genall ^ hashsplit ^ headerer ^ import ^ listsrc ^
|
||||
if (!(add ^ datfromdir ^ extsplit ^ generate ^ genall ^ hashsplit ^ headerer ^ import ^ listsrc ^
|
||||
listsys ^ (merge || diffMode != 0 || update || outputFormat != 0 || tsv != null|| trim) ^ rem ^ stats ^ typesplit))
|
||||
{
|
||||
_logger.Error("Only one feature switch is allowed at a time");
|
||||
@@ -634,7 +628,7 @@ namespace SabreTools
|
||||
}
|
||||
|
||||
// If a switch that requires a filename is set and no file is, show the help screen
|
||||
if (inputs.Count == 0 && (datfromdir || datfromdirparallel || extsplit || hashsplit || headerer
|
||||
if (inputs.Count == 0 && (datfromdir || extsplit || hashsplit || headerer
|
||||
|| (merge || diffMode != 0 || update || outputFormat != 0 || tsv != null) || stats || trim || typesplit))
|
||||
{
|
||||
_logger.Error("This feature requires at least one input");
|
||||
@@ -666,13 +660,6 @@ namespace SabreTools
|
||||
else if (datfromdir)
|
||||
{
|
||||
InitDatFromDir(inputs, filename, name, description, category, version, author, forceunpack, outputFormat,
|
||||
romba, superdat, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, tempdir);
|
||||
}
|
||||
|
||||
// Create a DAT from a directory or set of directories in parallel
|
||||
else if (datfromdirparallel)
|
||||
{
|
||||
InitDatFromDirParallel(inputs, filename, name, description, category, version, author, forceunpack, outputFormat,
|
||||
romba, superdat, noMD5, noSHA1, bare, archivesAsFiles, enableGzip, tempdir, maxParallelism);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user