diff options
author | Kim Alvefur <zash@zash.se> | 2014-11-08 12:28:49 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-11-08 12:28:49 +0100 |
commit | 090d1d01f4336cb3171631a429c40ec286065642 (patch) | |
tree | 531fa4aa0e138da9d25a9e8b4bc7a4f8eddd2b7f | |
parent | 597c04000ed4ddf817b60c704eef03fc4129e9b0 (diff) | |
download | prosody-090d1d01f4336cb3171631a429c40ec286065642.tar.gz prosody-090d1d01f4336cb3171631a429c40ec286065642.zip |
util.paths: Add function for joining path segments
-rw-r--r-- | util/paths.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/paths.lua b/util/paths.lua index 3e5744df..89f4cad9 100644 --- a/util/paths.lua +++ b/util/paths.lua @@ -1,3 +1,5 @@ +local t_concat = table.concat; + local path_sep = package.config:sub(1,1); local path_util = {} @@ -35,4 +37,8 @@ function path_util.glob_to_pattern(glob) end).."$"; end +function path_util.join(...) + return t_concat({...}, path_sep); +end + return path_util; |