optimize: make relative (#1529)

This commit is contained in:
yetone
2025-03-08 21:15:07 +08:00
committed by GitHub
parent 4766e76a31
commit 3741460541
6 changed files with 268 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ local function has_permission_to_access(abs_path)
-- Specifically, it should not check the project root itself
-- Otherwise if the binary is named the same as the project root (such as Go binary), any paths
-- insde the project root will be ignored
local rel_path = Path:new(abs_path):make_relative(project_root)
local rel_path = Utils.make_relative_path(abs_path, project_root)
return not Utils.is_ignored(rel_path, gitignore_patterns, gitignore_negate_patterns)
end