* fix -script g:code URI encoding problems

This commit is contained in:
Reinhard Pointner 2012-08-11 12:23:30 +00:00
parent b5cdd5fd63
commit d56f19f9c3
2 changed files with 6 additions and 3 deletions

View File

@ -128,7 +128,7 @@ public class ArgumentProcessor {
Analytics.trackEvent("CLI", "ExecuteScript", script.getScheme());
ScriptShell shell = new ScriptShell(cli, args, AccessController.getContext(), scriptProvider);
shell.runScript(script.toString(), bindings);
shell.runScript(script, bindings);
}
CLILogger.finest("Done ヾ(@⌒ー⌒@)");

View File

@ -83,9 +83,12 @@ class ScriptShell {
public Object runScript(String input, Bindings bindings) throws Throwable {
URI resource = scriptProvider.getScriptLocation(input);
return runScript(scriptProvider.getScriptLocation(input), bindings);
}
public Object runScript(URI resource, Bindings bindings) throws Throwable {
Script script = scriptProvider.fetchScript(resource);
return evaluate(script.code, bindings, script.trusted);
}