Add option to remove Date from generated name

This commit is contained in:
Matt Nadareski
2016-04-12 23:46:10 -07:00
parent 4952135919
commit a8af9ec0c3
2 changed files with 7 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ namespace SabreTools
// User specified variables
private static bool _noMD5;
private static bool _noSHA1;
private static bool _noDate;
private static bool _forceunzip;
private static bool _allfiles;
private static bool _old;
@@ -75,6 +76,10 @@ namespace SabreTools
case "--noSHA1":
_noSHA1 = true;
break;
case "-b":
case "--bare":
_noDate = true;
break;
case "-u":
case "--unzip":
_forceunzip = true;
@@ -173,7 +178,7 @@ namespace SabreTools
string[] splitPath = _basePath.Split(Path.DirectorySeparatorChar);
_name = (_name == "" ? (inputs.Count > 1 ? Environment.CurrentDirectory.Split(Path.DirectorySeparatorChar).Last() :
(_basePath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? splitPath[splitPath.Length - 2] : splitPath.Last())) : _name);
_desc = (_desc == "" ? _name + " (" + _date + ")" : _desc);
_desc = (_desc == "" ? _name + (_noDate ? "" : " (" + _date + ")") : _desc);
// Now write it all out as a DAT
try

View File

@@ -111,6 +111,7 @@ Options:
-h, -?, --help Show this help dialog
-m, --noMD5 Don't include MD5 in output
-s, --noSHA1 Don't include SHA1 in output
-b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT
-f, --files Treat archives as files
-o, --old Output DAT in RV format instead of XML