Changeset

6505:2dc8dbd0940e

util.paths: Add function for joining path segments
author Kim Alvefur <zash@zash.se>
date Sat, 08 Nov 2014 12:28:49 +0100
parents 6504:e1659f32852e
children 6510:8273236a995f
files util/paths.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/paths.lua	Tue Nov 04 17:48:17 2014 +0100
+++ b/util/paths.lua	Sat Nov 08 12:28:49 2014 +0100
@@ -1,3 +1,5 @@
+local t_concat = table.concat;
+
 local path_sep = package.config:sub(1,1);
 
 local path_util = {}
@@ -35,4 +37,8 @@
 	end).."$";
 end
 
+function path_util.join(...)
+	return t_concat({...}, path_sep);
+end
+
 return path_util;