Skip to content

Commit

Permalink
Fix for absolute paths in src
Browse files Browse the repository at this point in the history
  • Loading branch information
Avril112113 committed Apr 26, 2024
1 parent b902898 commit 0c39151
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tool/project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,17 @@ function Project:findModFile(modpath, path)
---@diagnostic disable-next-line: param-type-mismatch
for _, src in ipairs(srcs) do
if #src > 0 then
local new_repl = path:gsub(
"%?",
AVPath.join{self.multiproject.project_path, src, "?"}
)
table.insert(path_parts, new_repl)
if AVPath.getabs(src) then
table.insert(path_parts, (path:gsub(
"%?",
AVPath.join{src, "?"}
)))
else
table.insert(path_parts, (path:gsub(
"%?",
AVPath.join{self.multiproject.project_path, src, "?"}
)))
end
end
end
local full_path, err = package.searchpath(modpath, table.concat(path_parts, ";"))
Expand Down

0 comments on commit 0c39151

Please sign in to comment.