mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Changed instances of "/" to File.separator for quest data IO (thanks Chris H)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user