From 665e72b4d4c7a9d3372f371e6916a959319b1093 Mon Sep 17 00:00:00 2001 From: Caohongtao Date: Wed, 4 Sep 2024 09:43:34 +0000 Subject: [PATCH] =?UTF-8?q?update=20scripts/gen=5Fapp=5Fpartitions.py.=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=AD=97=E8=8A=82=E5=A4=A7=E4=BA=8E0?= =?UTF-8?q?=E6=89=8D=E5=8E=BB=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caohongtao --- scripts/gen_app_partitions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gen_app_partitions.py b/scripts/gen_app_partitions.py index 201701101..38dd80f0d 100644 --- a/scripts/gen_app_partitions.py +++ b/scripts/gen_app_partitions.py @@ -146,7 +146,7 @@ def parse_obj_files(partitions): if re.match(r".*\.obj$", filename): fullname = os.path.join(dirpath, filename) fsize = os.path.getsize(fullname) - if fsize != 0: + if fsize != 0 and os.path.getsize(fullname) > 0: find_obj_file_partitions(fullname, partitions) @@ -166,7 +166,7 @@ def parse_compile_command_file(partitions): # Because of issue #40635, then not all objects referenced by # the compile_commands.json file may be available, therefore # only include existing files. - if os.path.exists(fullname): + if os.path.exists(fullname) and os.path.getsize(fullname) > 0: find_obj_file_partitions(fullname, partitions) -- Gitee