summaryrefslogtreecommitdiff
path: root/luaextra-dir.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-03-22 17:49:04 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-03-22 17:49:04 +0200
commit22fa4cc9381179fdd43ca8a251cb49dd2703079d (patch)
treea222ca028b0f3bec9f4057424623323602174c29 /luaextra-dir.lua
parent87f7676bed961c8de29cc7fd2bebb41fe106f678 (diff)
downloadlualibs-22fa4cc9381179fdd43ca8a251cb49dd2703079d.tar.gz
Sync with ConTeXt
Diffstat (limited to 'luaextra-dir.lua')
-rw-r--r--luaextra-dir.lua8
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