优化路径判断逻辑
This commit is contained in:
@@ -476,8 +476,9 @@ class WindowsPackageBuilder:
|
|||||||
path_str = str(path.relative_to(self.project_root))
|
path_str = str(path.relative_to(self.project_root))
|
||||||
for pattern in exclude_patterns:
|
for pattern in exclude_patterns:
|
||||||
if pattern.endswith('/*'):
|
if pattern.endswith('/*'):
|
||||||
# Directory content exclusion
|
# Directory content exclusion - must match exact directory name or start with "dirname/"
|
||||||
if path_str.startswith(pattern[:-2]):
|
dir_name = pattern[:-2]
|
||||||
|
if path_str == dir_name or path_str.startswith(f"{dir_name}/"):
|
||||||
return True
|
return True
|
||||||
elif pattern.endswith('*'):
|
elif pattern.endswith('*'):
|
||||||
# Wildcard pattern
|
# Wildcard pattern
|
||||||
|
|||||||
Reference in New Issue
Block a user