mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add option to remove Date from generated name
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user