Verify folder exists after its generated.
This commit is contained in:
parent
381dc4a9bb
commit
cc4210d95a
1 changed files with 3 additions and 3 deletions
|
@ -258,21 +258,21 @@ public class WorldSettings extends Configuration
|
|||
File aeBaseFolder = new File( world.getPath() + File.separatorChar + "AE2" );
|
||||
|
||||
if ( !aeBaseFolder.exists() || !aeBaseFolder.isDirectory() )
|
||||
if ( !aeBaseFolder.mkdir() )
|
||||
if ( !aeBaseFolder.mkdir() || !aeBaseFolder.exists() )
|
||||
{
|
||||
throw new RuntimeException( "Failed to create " + aeBaseFolder.getAbsolutePath() );
|
||||
}
|
||||
|
||||
File compass = new File( aeBaseFolder, "compass" );
|
||||
if ( !compass.exists() || !compass.isDirectory() )
|
||||
if ( !compass.mkdir() )
|
||||
if ( !compass.mkdir() || !compass.exists() )
|
||||
{
|
||||
throw new RuntimeException( "Failed to create " + compass.getAbsolutePath() );
|
||||
}
|
||||
|
||||
File spawnData = new File( aeBaseFolder, "spawndata" );
|
||||
if ( !spawnData.exists() || !spawnData.isDirectory() )
|
||||
if ( !spawnData.mkdir() )
|
||||
if ( !spawnData.mkdir() || !spawnData.exists() )
|
||||
{
|
||||
throw new RuntimeException( "Failed to create " + spawnData.getAbsolutePath() );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue