diff options
author | Lauri Leukkunen <lle@rahina.org> | 2006-12-22 04:48:10 +0200 |
---|---|---|
committer | Lauri Leukkunen <lleukkun@leka.rahina.org> | 2006-12-22 04:48:10 +0200 |
commit | 6dd431fdb8e5fdc780bcafe06bf451074d5cde58 (patch) | |
tree | 11a71e24dda47966737a5f58f69662a5720e5198 /redir_scripts/main.lua | |
parent | 7b4a706e21f953e26cdc6ed10c862a4f3e8b4f79 (diff) |
* cleanup
* fix relative path handling in main.lua
Diffstat (limited to 'redir_scripts/main.lua')
-rw-r--r-- | redir_scripts/main.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/redir_scripts/main.lua b/redir_scripts/main.lua index 596cad3..9e68ed6 100644 --- a/redir_scripts/main.lua +++ b/redir_scripts/main.lua @@ -110,6 +110,11 @@ function sbox_translate_path(binary_name, func_name, work_dir, path) rp = path end + if (string.sub(rp, 1, 1) ~= "/") then + -- relative path, convert to absolute + rp = work_dir .. "/" .. rp + end + -- loop through the rules, first match is used for n=1,table.maxn(rules) do -- print(string.format("looping through rules: %s, %s, %s", rules[n].binary, rules[n].func_name, rules[n].path)) |