summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-06-04 22:38:32 +0800
committerGitHub <[email protected]>2026-06-04 22:38:32 +0800
commit2245e0b6ed0f954aae1dafe225c2b436ae98cfcd (patch)
treed85d5220b43c616db8699388b86f6fad2ac4f91f
parent665fa2c71bb53c2d621f6a3a1a1116f90d56fb21 (diff)
parente5acd354bec225e633eeb8ad08f0b397ff20e7d9 (diff)
Merge pull request #7580 from ArthurVasseur/fix/format-plugin-headerfile-absolute-path
plugin/format: fix doubled paths for absolute header files on Windows
-rw-r--r--xmake/plugins/format/main.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/plugins/format/main.lua b/xmake/plugins/format/main.lua
index fe05d86c6..7d5e1de66 100644
--- a/xmake/plugins/format/main.lua
+++ b/xmake/plugins/format/main.lua
@@ -185,12 +185,12 @@ function main()
for _, target in ipairs(targets) do
for _, source in ipairs(target:sourcefiles()) do
if _match_sourcefiles(source, filepatterns) then
- table.insert(sourcefiles, path.join(projectdir, source))
+ table.insert(sourcefiles, path.absolute(source, projectdir))
end
end
for _, header in ipairs(target:headerfiles()) do
if _match_sourcefiles(header, filepatterns) then
- table.insert(sourcefiles, path.join(projectdir, header))
+ table.insert(sourcefiles, path.absolute(header, projectdir))
end
end
end
@@ -199,12 +199,12 @@ function main()
for _, sourcebatch in pairs(target:sourcebatches()) do
if _source_batch_should_format(sourcebatch) then
for _, source in ipairs(sourcebatch.sourcefiles) do
- table.insert(sourcefiles, path.join(projectdir, source))
+ table.insert(sourcefiles, path.absolute(source, projectdir))
end
end
end
for _, header in ipairs(target:headerfiles()) do
- table.insert(sourcefiles, path.join(projectdir, header))
+ table.insert(sourcefiles, path.absolute(header, projectdir))
end
end
end