From 090d1d01f4336cb3171631a429c40ec286065642 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Nov 2014 12:28:49 +0100 Subject: util.paths: Add function for joining path segments --- util/paths.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util/paths.lua') 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; -- cgit v1.2.3