Changed instances of "/" to File.separator for quest data IO (thanks Chris H)

This commit is contained in:
Doublestrike
2012-02-03 06:02:25 +00:00
parent 4cf9691963
commit 72696af9ca
2 changed files with 4 additions and 4 deletions

View File

@@ -200,7 +200,7 @@ public class QuestDataIO {
xStream.alias("CardPool", ItemPool.class);
xStream.alias("DeckSection", DeckSection.class);
final File f = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + "/" + qd.getName() + ".dat");
final File f = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + File.separator + qd.getName() + ".dat");
final BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(f));
final GZIPOutputStream zout = new GZIPOutputStream(bout);
xStream.toXML(qd, zout);

View File

@@ -318,8 +318,8 @@ public class QuestFileLister extends JPanel {
return;
}
else {
File newpath = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + "/" + questName + ".dat");
File oldpath = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + "/" + s0 + ".dat");
File newpath = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + File.separator + questName + ".dat");
File oldpath = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + File.separator + s0 + ".dat");
oldpath.renameTo(newpath);
}
@@ -338,7 +338,7 @@ public class QuestFileLister extends JPanel {
return;
}
new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + "/" + r0.getQuestData().getName() + ".dat").delete();
new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + File.separator + r0.getQuestData().getName() + ".dat").delete();
if (cmdRowDelete != null) { cmdRowDelete.execute(); }