summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-06-26 11:37:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-06-26 11:37:00 +0200
commitc987f1f9c3add1eb3ad06ce40e9e1f521793cf77 (patch)
tree53b9dc8115aed15d5d17af3817360e75ba167b46 /scripts
parent113472b1fb39f29dd8f02f31b5be100eb3e71536 (diff)
downloadcontext-c987f1f9c3add1eb3ad06ce40e9e1f521793cf77.tar.gz
beta 2011.06.26 11:37
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtxrun.lua8
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua8
-rwxr-xr-xscripts/context/stubs/unix/mtxrun8
3 files changed, 12 insertions, 12 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index af7298858..33be959e2 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -2608,10 +2608,10 @@ end
local trick_1 = char(1)
local trick_2 = "^" .. trick_1 .. "/+"
-function file.join(...)
+function file.join(...) -- rather dirty
local lst = { ... }
local a, b = lst[1], lst[2]
- if a == "" then
+ if not a or a == "" then -- not a added
lst[1] = trick_1
elseif b and find(a,"^/+$") and find(b,"^/") then
lst[1] = ""
@@ -12483,7 +12483,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if not subpath or subpath == "" then
-- rootscan already done
elseif type(subpath) == "string" then
- local fname = check_subpath(filejoin(ppname,subpath,w))
+ local fname = check_subpath(filejoin(pname,subpath,w))
if fname then
result[#result+1] = fname
done = true
@@ -12497,7 +12497,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if sp == "" then
-- roottest already done
else
- local fname = check_subpath(filejoin(ppname,sp,w))
+ local fname = check_subpath(filejoin(pname,sp,w))
if fname then
result[#result+1] = fname
done = true
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index af7298858..33be959e2 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -2608,10 +2608,10 @@ end
local trick_1 = char(1)
local trick_2 = "^" .. trick_1 .. "/+"
-function file.join(...)
+function file.join(...) -- rather dirty
local lst = { ... }
local a, b = lst[1], lst[2]
- if a == "" then
+ if not a or a == "" then -- not a added
lst[1] = trick_1
elseif b and find(a,"^/+$") and find(b,"^/") then
lst[1] = ""
@@ -12483,7 +12483,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if not subpath or subpath == "" then
-- rootscan already done
elseif type(subpath) == "string" then
- local fname = check_subpath(filejoin(ppname,subpath,w))
+ local fname = check_subpath(filejoin(pname,subpath,w))
if fname then
result[#result+1] = fname
done = true
@@ -12497,7 +12497,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if sp == "" then
-- roottest already done
else
- local fname = check_subpath(filejoin(ppname,sp,w))
+ local fname = check_subpath(filejoin(pname,sp,w))
if fname then
result[#result+1] = fname
done = true
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index af7298858..33be959e2 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -2608,10 +2608,10 @@ end
local trick_1 = char(1)
local trick_2 = "^" .. trick_1 .. "/+"
-function file.join(...)
+function file.join(...) -- rather dirty
local lst = { ... }
local a, b = lst[1], lst[2]
- if a == "" then
+ if not a or a == "" then -- not a added
lst[1] = trick_1
elseif b and find(a,"^/+$") and find(b,"^/") then
lst[1] = ""
@@ -12483,7 +12483,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if not subpath or subpath == "" then
-- rootscan already done
elseif type(subpath) == "string" then
- local fname = check_subpath(filejoin(ppname,subpath,w))
+ local fname = check_subpath(filejoin(pname,subpath,w))
if fname then
result[#result+1] = fname
done = true
@@ -12497,7 +12497,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if sp == "" then
-- roottest already done
else
- local fname = check_subpath(filejoin(ppname,sp,w))
+ local fname = check_subpath(filejoin(pname,sp,w))
if fname then
result[#result+1] = fname
done = true