Fix for bug #11 - last change was wrong

This commit is contained in:
walterhiggins 2013-01-06 08:57:21 +00:00
parent 3bd821dba1
commit 4896e8414e

View file

@ -1,6 +1,6 @@
package net.walterhiggins.scriptcraft; package net.walterhiggins.scriptcraft;
import java.io.File; import java.io.File;
import java.io.IOException;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.command.*; import org.bukkit.command.*;
import org.mozilla.javascript.*; import org.mozilla.javascript.*;
@ -32,8 +32,7 @@ public class ScriptCraftPlugin extends JavaPlugin
// //
// fix for bug #11 // fix for bug #11
// //
canonicalPath = f.getCanonicalPath(); canonicalPath = f.getCanonicalPath().replaceAll("\\\\", "/");
canonicalPath = canonicalPath.replaceAll("\\\\", "/");
this.evaluator.eval("load(\"" + canonicalPath + "\")", null); this.evaluator.eval("load(\"" + canonicalPath + "\")", null);
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block