Merge pull request #14 from SagePtr/patch-1
Fixed an exception when using CLI's --patch arg without any mods
This commit is contained in:
commit
4bb3a3ddb9
1 changed files with 15 additions and 13 deletions
|
@ -233,22 +233,24 @@ public class SlipstreamCLI {
|
||||||
log.info( "Patching..." );
|
log.info( "Patching..." );
|
||||||
|
|
||||||
List<File> modFiles = new ArrayList<File>();
|
List<File> modFiles = new ArrayList<File>();
|
||||||
for ( String modFileName : slipstreamCmd.modFileNames ) {
|
if ( slipstreamCmd.modFileNames != null ) {
|
||||||
File modFile = new File( modsDir, modFileName );
|
for ( String modFileName : slipstreamCmd.modFileNames ) {
|
||||||
|
File modFile = new File( modsDir, modFileName );
|
||||||
|
|
||||||
if ( modFile.isDirectory() ) {
|
if ( modFile.isDirectory() ) {
|
||||||
log.info( String.format( "Zipping dir: %s/", modFile.getName() ) );
|
log.info( String.format( "Zipping dir: %s/", modFile.getName() ) );
|
||||||
try {
|
try {
|
||||||
modFile = createTempMod( modFile );
|
modFile = createTempMod( modFile );
|
||||||
deleteHook.addDoomedFile( modFile );
|
deleteHook.addDoomedFile( modFile );
|
||||||
}
|
}
|
||||||
catch ( IOException e ) {
|
catch ( IOException e ) {
|
||||||
log.error( String.format( "Error zipping dir: %s/", modFile.getName() ), e );
|
log.error( String.format( "Error zipping dir: %s/", modFile.getName() ), e );
|
||||||
System.exit( 1 );
|
System.exit( 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modFiles.add( modFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
modFiles.add( modFile );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean globalPanic = slipstreamCmd.globalPanic;
|
boolean globalPanic = slipstreamCmd.globalPanic;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue