Changed backslashes to forwardslashes for OSX file handling of quest datas. Tested working on r13702, NPE on r13703++ prevents decisive testing.

This commit is contained in:
Doublestrike
2012-02-01 04:01:54 +00:00
parent 94ce5864ad
commit 3eb1eea175
3 changed files with 5 additions and 5 deletions

View File

@@ -195,7 +195,7 @@ public class QuestDataIO {
xStream.registerConverter(new CardPoolToXml());
xStream.alias("CardPool", ItemPool.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) + "/" + 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) + "/" + questName + ".dat");
File oldpath = new File(ForgeProps.getFile(NewConstants.Quest.DATA_DIR) + "/" + 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) + "/" + r0.getQuestData().getName() + ".dat").delete();
if (cmdRowDelete != null) { cmdRowDelete.execute(); }