Skip to content

Commit

Permalink
adapt to support windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kensoh authored Mar 18, 2017
1 parent 4006b1e commit abcb49c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tagui_parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ function is_code($raw_intent) {

function abs_file($filename) { // helper function to return absolute filename
if ($filename == "") return ""; $flow_script = $GLOBALS['script']; // get flow filename
if (substr($filename,0,1)=="/") return $filename; // return absolute filename directly
// otherwise get path of the flow script and use it to build absolute filename
$flow_path = dirname($flow_script); return $flow_path . '/' . $filename;}
if (substr($filename,0,1)=="/") return $filename; // return absolute filename directly macos/linux
if (substr($filename,1,1)==":") return $filename; // return absolute filename directly for windows
$flow_path = dirname($flow_script); // otherwise get path of the flow script and use it to build absolute filename
if (strpos($flow_path,"/")!==false) return $flow_path . '/' . $filename; else return $flow_path . '\\' . $filename;}

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

1 comment on commit abcb49c

@kensoh
Copy link
Member Author

@kensoh kensoh commented on abcb49c Mar 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of addressing #5

Please sign in to comment.