diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-03-28 14:34:44 +0200 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-03-28 14:34:44 +0200 |
commit | 0bb6d1e8d28f914398d3b3de15cf5317f480d02a (patch) | |
tree | a222ca028b0f3bec9f4057424623323602174c29 /luaextra-dir.lua | |
parent | 7047b46b6fe6dead388c8427a7510710f920b617 (diff) | |
parent | 22fa4cc9381179fdd43ca8a251cb49dd2703079d (diff) | |
download | lualibs-0bb6d1e8d28f914398d3b3de15cf5317f480d02a.tar.gz |
Merge remote branch 'github/master'
Diffstat (limited to 'luaextra-dir.lua')
-rw-r--r-- | luaextra-dir.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/luaextra-dir.lua b/luaextra-dir.lua index 3760db2..0d08362 100644 --- a/luaextra-dir.lua +++ b/luaextra-dir.lua @@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['l-dir'] = { license = "see context related readme files" } +-- dir.expand_name will be merged with cleanpath and collapsepath + local type = type local find, gmatch, match, gsub = string.find, string.gmatch, string.match, string.gsub local lpegmatch = lpeg.match @@ -174,7 +176,7 @@ end local make_indeed = true -- false -if string.find(os.getenv("PATH"),";") then +if string.find(os.getenv("PATH"),";") then -- os.type == "windows" function dir.mkdirs(...) local str, pth = "", "" @@ -241,7 +243,7 @@ if string.find(os.getenv("PATH"),";") then --~ print(dir.mkdirs("///a/b/c")) --~ print(dir.mkdirs("a/bbb//ccc/")) - function dir.expand_name(str) + function dir.expand_name(str) -- will be merged with cleanpath and collapsepath local first, nothing, last = match(str,"^(//)(//*)(.*)$") if first then first = lfs.currentdir() .. "/" @@ -323,7 +325,7 @@ else --~ print(dir.mkdirs("///a/b/c")) --~ print(dir.mkdirs("a/bbb//ccc/")) - function dir.expand_name(str) + function dir.expand_name(str) -- will be merged with cleanpath and collapsepath if not find(str,"^/") then str = lfs.currentdir() .. "/" .. str end |