Skip to content

Commit

Permalink
Merge pull request #201 from Aussiroth/fix-absfile
Browse files Browse the repository at this point in the history
Fix filename issues when creating with absfile
  • Loading branch information
kensoh authored Jun 4, 2018
2 parents 072ede7 + 99be5e2 commit f8c715c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/tagui_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,8 @@ if (filename.substr(0,1) == '/') return filename; // return mac/linux absolute f
if (filename.substr(1,1) == ':') return filename.replace(/\\/g,'/'); // return windows absolute filename directly
var tmp_flow_path = flow_path; // otherwise use flow_path defined in generated script to build absolute filename
// above str_replace is because casperjs/phantomjs do not seem to support \ for windows paths, replace with / to work
if (tmp_flow_path.indexOf('/') > -1) return tmp_flow_path + '/' + filename; else return tmp_flow_path + '\\' + filename;}
if (tmp_flow_path.indexOf('/') > -1) return (tmp_flow_path + '/' + filename).replace(/\\/g,'/');
else return tmp_flow_path + '\\' + filename;}

function add_concat(source_string) { // parse string and add missing + concatenator
if ((source_string.indexOf("'") > -1) && (source_string.indexOf('"') > -1))
Expand Down
3 changes: 2 additions & 1 deletion src/tagui_parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ function abs_file($filename) { // helper function to return absolute filename
return "'+abs_file('" . $filename . "')+'"; // throw to runtime abs_file function if dynamic filename is given
$flow_path = str_replace("\\","/",dirname($flow_script)); // otherwise use flow script path to build absolute filename
// above str_replace is because casperjs/phantomjs do not seem to support \ for windows paths, replace with / to work
if (strpos($flow_path,"/")!==false) return $flow_path . '/' . $filename; else return $flow_path . '\\' . $filename;}
if (strpos($flow_path,"/")!==false) return str_replace("\\","/",$flow_path . '/' . $filename);
else return $flow_path . '\\' . $filename;}

function beg_tx($locator) { // helper function to return beginning string for handling locators
if ($GLOBALS['inside_while_loop'] == 0)
Expand Down

0 comments on commit f8c715c

Please # to comment.