From 48e5a65e288d71471daa2d4c54192899824a223b Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 7 May 2022 23:37:45 +0800 Subject: [PATCH] fix filegroup match --- xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua | 4 ++-- xmake/plugins/project/vsxmake/getinfo.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua index b26bea68e0b..d418afb344d 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua @@ -82,8 +82,8 @@ function _make_filter(filepath, target, vcxprojdir) local files = extraconf.files or "**" local mode = extraconf.mode for _, filepattern in ipairs(files) do - filepattern = path.pattern(path.translate(filepattern)) - if fileitem:match(filepattern) then + filepattern = path.pattern(path.absolute(path.join(rootdir, filepattern))) + if filepath:match(filepattern) then if mode == "plain" then filter = path.normalize(filegroup) else diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index d07757d1938..f855b3bee5d 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -360,7 +360,7 @@ function _make_filter(filepath, target, vcxprojdir) local files = extraconf.files or "**" local mode = extraconf.mode for _, filepattern in ipairs(files) do - filepattern = path.pattern(path.translate(filepattern)) + filepattern = path.pattern(path.absolute(path.join(rootdir, filepattern))) if fileitem:match(filepattern) then if mode == "plain" then filter = path.normalize(filegroup)