Correctly handle empty directory when checking for missing file

This commit is contained in:
Alister Cordiner 2023-04-04 09:44:02 +10:00 committed by Alex Eagle
parent 6fddec2e6e
commit 803d5ecda8
1 changed files with 1 additions and 1 deletions

View File

@ -371,5 +371,5 @@ def _is_file_missing(label):
"""
file_abs = "%s/%s" % (label.package, label.name)
file_rel = file_abs[len(native.package_name()) + 1:]
file_glob = native.glob([file_rel], exclude_directories = 0)
file_glob = native.glob([file_rel], exclude_directories = 0, allow_empty = True)
return len(file_glob) == 0