Skip to content

Commit c926b85

Browse files
author
SakoPak
committed
remove redundant line
1 parent b5d6a6c commit c926b85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/azure-cli/azure/cli/command_modules/acr/_archive_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _pack_source_code(source_location, tar_file_path, docker_file_path, docker_f
7070

7171
def _ignore_check(tarinfo, parent_ignored, parent_matching_rule_index):
7272
# ignore common vcs dir or file
73-
if tarinfo.name in common_vcs_ignore_list:
73+
if os.path.basename(tarinfo.name) in common_vcs_ignore_list:
7474
logger.warning("Excluding '%s' based on default ignore rules", tarinfo.name)
7575
return True, parent_matching_rule_index
7676

@@ -211,7 +211,7 @@ def _archive_file_recursively(tar, name, arcname, parent_ignored, parent_matchin
211211

212212
# even the dir is ignored, its child items can still be included, so continue to scan
213213
# Exception: Skip scanning performance-impacting directories entirely
214-
if tarinfo.isdir() and not (ignored and os.path.basename(tarinfo.name) in build_ignore_dirs):
214+
if tarinfo.isdir() and not (os.path.basename(tarinfo.name) in build_ignore_dirs):
215215
for f in os.listdir(name):
216216
_archive_file_recursively(tar, os.path.join(name, f), os.path.join(arcname, f),
217217
parent_ignored=ignored, parent_matching_rule_index=matching_rule_index,

0 commit comments

Comments
 (0)