Throw an Exception when WorldSettings fail to create the required directory structure.

This commit is contained in:
AlgorithmX2
2014-08-23 17:55:55 -05:00
parent d917ae7765
commit 4b83c804cf
2 changed files with 33 additions and 15 deletions
+6 -1
View File
@@ -5,6 +5,8 @@ import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import appeng.core.AELog;
public class CompassRegion
{
@@ -159,7 +161,10 @@ public class CompassRegion
File folderFile = new File( folder );
if ( !folderFile.exists() || !folderFile.isDirectory() )
folderFile.mkdir();
{
if ( !folderFile.mkdir() )
AELog.info( "Failed to created AE2/compass/" );
}
return new File( folder + File.separatorChar + world + "_" + low_x + "_" + low_z + ".dat" );
}