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)