Bugfix: Don't crash if the preset file couldn't be found.\nThis makes automating SpritePacker simpler.
This commit is contained in:
parent
92328ae39c
commit
494e8c09fa
1 changed files with 5 additions and 1 deletions
|
@ -58,7 +58,11 @@ namespace SpritePacker
|
||||||
Verbose = true;
|
Verbose = true;
|
||||||
break;
|
break;
|
||||||
case "--preset":
|
case "--preset":
|
||||||
rawSourceLocations = File.ReadAllText(args[++i]);
|
string presetFilename = args[++i];
|
||||||
|
if (File.Exists(presetFilename))
|
||||||
|
rawSourceLocations = File.ReadAllText(presetFilename);
|
||||||
|
else
|
||||||
|
Console.Error.WriteLine("Warning: Couldn't find the preset csv file at {0}", presetFilename);
|
||||||
break;
|
break;
|
||||||
case "--csv":
|
case "--csv":
|
||||||
outputFormat = OutputFormat.CSV;
|
outputFormat = OutputFormat.CSV;
|
||||||
|
|
Loading…
Reference in a new issue