Diff

util/paths.lua @ 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
parent 6164:ef4024f6bc40
child 10197:91085371cfc5
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;