From eae0a182463de0d83efc7b30f70bee4feb6ecedb Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Wed, 11 Jul 2012 00:40:32 +0000 Subject: [PATCH] * Fix crash in SaveGame class due to lack of regex escape -> used char token instead git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9557 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/tools/jme3tools/savegame/SaveGame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/tools/jme3tools/savegame/SaveGame.java b/engine/src/tools/jme3tools/savegame/SaveGame.java index 56a693efe..3cb55cf81 100644 --- a/engine/src/tools/jme3tools/savegame/SaveGame.java +++ b/engine/src/tools/jme3tools/savegame/SaveGame.java @@ -38,7 +38,7 @@ public class SaveGame { BinaryExporter ex = BinaryExporter.getInstance(); OutputStream os = null; try { - File daveFolder = new File(JmeSystem.getStorageFolder().getAbsolutePath() + File.separator + gamePath.replaceAll("/", File.separator)); + File daveFolder = new File(JmeSystem.getStorageFolder().getAbsolutePath() + File.separator + gamePath.replace('/', File.separatorChar)); if (!daveFolder.exists() && !daveFolder.mkdirs()) { Logger.getLogger(SaveGame.class.getName()).log(Level.SEVERE, "Error creating save file!"); throw new IllegalStateException("SaveGame dataset cannot be created"); @@ -90,7 +90,7 @@ public class SaveGame { InputStream is = null; Savable sav = null; try { - File file = new File(JmeSystem.getStorageFolder().getAbsolutePath() + File.separator + gamePath.replaceAll("/", File.separator) + File.separator + dataName); + File file = new File(JmeSystem.getStorageFolder().getAbsolutePath() + File.separator + gamePath.replace('/', File.separatorChar) + File.separator + dataName); if(!file.exists()){ return null; }