Hopefully fixed bug with file seperator. Just forced "/" as it works on Windows and Linux

This commit is contained in:
Drakia 2011-03-10 01:32:27 -08:00
parent bfde05eb5c
commit e851b395d2
3 changed files with 5 additions and 4 deletions

View File

@ -324,7 +324,7 @@ public class Gate {
Stargate.log.log(Level.SEVERE, "Could not load Gate " + file.getName() + " - Gates must have exactly 2 control points.");
return null;
} else {
gate.save(file.getParent() + File.separator); // Updates format for version changes
gate.save(file.getParent() + "/"); // Updates format for version changes
return gate;
}
}

View File

@ -655,7 +655,7 @@ public class Portal {
}
public static void saveAllGates(World world) {
String loc = Stargate.getSaveLocation() + File.separator + world.getName() + ".db";
String loc = Stargate.getSaveLocation() + "/" + world.getName() + ".db";
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(loc, false));

View File

@ -84,8 +84,9 @@ public class Stargate extends JavaPlugin {
log = Logger.getLogger("Minecraft");
// Set portalFile and gateFolder to the plugin folder as defaults.
portalFolder = getDataFolder() + File.separator + "portals";
gateFolder = getDataFolder() + File.separator + "gates" + File.separator;
portalFolder = getDataFolder() + "/portals";
gateFolder = getDataFolder() + "/gates/";
log.info(pdfFile.getName() + " v." + pdfFile.getVersion() + " is enabled.");