From 51d05c442afca147d225f99fcec5f66b89b1c525 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 25 Mar 2024 13:36:30 +1100 Subject: [PATCH] tools/manifestfile.py: Fix freeze() when script is an empty iterable. The documentation for `freeze()` says that: - If `script` is `None`, all files in `path` will be frozen. - If `script` is an iterable then `freeze()` is called on all items of the iterable. This commit makes sure this behaviour is followed when an empty tuple/list is passed in for `script` (previously an empty tuple/list froze all files). Fixes issue #14125. Signed-off-by: Damien George --- tools/manifestfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/manifestfile.py b/tools/manifestfile.py index c1fc836585fb..beaa36d0f5fc 100644 --- a/tools/manifestfile.py +++ b/tools/manifestfile.py @@ -291,7 +291,7 @@ def _add_file(self, full_path, target_path, kind=KIND_AUTO, opt=None): def _search(self, base_path, package_path, files, exts, kind, opt=None, strict=False): base_path = self._resolve_path(base_path) - if files: + if files is not None: # Use explicit list of files (relative to package_path). for file in files: if package_path: