Skip to content

Commit

Permalink
chore: fix some issues that arise with the 'new' teal version -- some…
Browse files Browse the repository at this point in the history
… more but I hope to be able to revert this
  • Loading branch information
atticus-sullivan committed Dec 11, 2024
1 parent cd7a185 commit 8e5fa56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src_teal/texrunner/pathutil_unix.tl
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,17 @@ local function joinpath2(x: string, y: string): string
end

local function joinpath(...: string): string
local args = {...}
local n = select("#", ...)
if n == 2 then
return joinpath2(...)
return joinpath2(args[1], args[2])
elseif n == 0 then
return "."
elseif n == 1 then
return ...
else
-- n is >= 3
return joinpath(joinpath2(...), select(3, ...))
-- n is >= 3
return joinpath(joinpath2(args[1], args[2]), select(3, ...))
end
end

Expand Down
7 changes: 4 additions & 3 deletions src_teal/texrunner/pathutil_windows.tl
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,17 @@ local function joinpath2(x: string, y: string): string
end

local function joinpath(...: string): string
local args = {...}
local n = select("#", ...)
if n == 2 then
return joinpath2(...)
return joinpath2(args[1], args[2])
elseif n == 0 then
return "."
elseif n == 1 then
return ...
else
-- n is >= 3
return joinpath(joinpath2(...), select(3, ...))
-- n is >= 3
return joinpath(joinpath2(args[1], args[2]), select(3, ...))
end
end

Expand Down

0 comments on commit 8e5fa56

Please sign in to comment.