mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Enable logging in SingleGame
This commit is contained in:
@@ -130,6 +130,7 @@ Usage: SingleGame.exe <file|folder> [-r=rootdir|-n]
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
-r=rootdir Set the directory name for path size
|
-r=rootdir Set the directory name for path size
|
||||||
|
-l, --log Enable logging to file
|
||||||
-n Disable single-game mode
|
-n Disable single-game mode
|
||||||
-z Disable forceunzipping
|
-z Disable forceunzipping
|
||||||
");
|
");
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace SabreTools
|
|||||||
|
|
||||||
_filename = args[0];
|
_filename = args[0];
|
||||||
|
|
||||||
|
bool tofile = false;
|
||||||
if (args.Length > 1)
|
if (args.Length > 1)
|
||||||
{
|
{
|
||||||
for (int i = 1; i < args.Length; i++)
|
for (int i = 1; i < args.Length; i++)
|
||||||
@@ -52,6 +53,10 @@ namespace SabreTools
|
|||||||
case "-z":
|
case "-z":
|
||||||
_forceunpack = false;
|
_forceunpack = false;
|
||||||
break;
|
break;
|
||||||
|
case "-l":
|
||||||
|
case "--log":
|
||||||
|
tofile = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (args[i].StartsWith("-r"))
|
if (args[i].StartsWith("-r"))
|
||||||
{
|
{
|
||||||
@@ -62,6 +67,9 @@ namespace SabreTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the possibly new value for logger
|
||||||
|
logger.ToFile = tofile;
|
||||||
|
|
||||||
_path = (_path == "" ? Environment.CurrentDirectory : _path);
|
_path = (_path == "" ? Environment.CurrentDirectory : _path);
|
||||||
|
|
||||||
// Drag and drop means quotes; we don't want quotes
|
// Drag and drop means quotes; we don't want quotes
|
||||||
|
|||||||
Reference in New Issue
Block a user