Skip to content
Snippets Groups Projects
Commit ae88f242 authored by deuce's avatar deuce
Browse files

Check for absolute paths in filename.

parent ebbec62a
Branches
Tags
No related merge requests found
......@@ -14,11 +14,12 @@ var last_cwd='';
xjs_load(xjs_filename);
function xjs_load(filename) {
if(last_cwd != '') {
if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1)
filename=last_cwd+'/'+filename;
}
var cwd=filename;
cwd=cwd.replace(/[^\\\/]*$/,'');
if(last_cwd != '')
filename=last_cwd+'/'+filename;
var ssjs_filename=filename+".ssjs";
// Probably a race condition on Win32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment