Fixed bug that was preventing the transceiver config from being written.

This commit is contained in:
CrazyPants committed 2013-10-21 13:01:24 +08:00
1 parent 5731168a43
commit aaa34804eb
2 files changed
+5 -3

No files matched your search

@@ -90,6 +90,7 @@ public class HyperCubeConfig {
FileOutputStream fos = null;
try {
file.getParentFile().mkdirs();
fos = new FileOutputStream(file);
props.store(fos, null);
} catch (IOException ex) {
@@ -40,8 +40,9 @@ public class HyperCubeRegister {
}
private void innerLoad() {
conf = new HyperCubeConfig(new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/dimensionalTransceiver.cfg"));
File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg");
File f = DimensionManager.getCurrentSaveRootDirectory();
conf = new HyperCubeConfig(new File(DimensionManager.getCurrentSaveRootDirectory(), "enderio/dimensionalTransceiver.cfg"));
File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "enderio/hypercubes.cfg");
if(oldFile.exists()) {
convertOldFile();
} else {
@@ -53,7 +54,7 @@ public class HyperCubeRegister {
private void convertOldFile() {
try {
File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "/enderio/hypercubes.cfg");
File oldFile = new File(DimensionManager.getCurrentSaveRootDirectory(), "enderio/hypercubes.cfg");
Configuration config = new Configuration(oldFile);
config.load();