From a749d7891d3e56f490214e203e1861c20377cbb5 Mon Sep 17 00:00:00 2001 From: hosted Date: Thu, 18 Dec 2025 20:14:51 +0800 Subject: [PATCH] fix syscap_define_custom.h incremental generation https://gitcode.com/openharmony/developtools_syscap_codec/issues/342?ref=&did=3643142#tid-3643142 Signed-off-by: hosted --- tools/syscap_config_merge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/syscap_config_merge.py b/tools/syscap_config_merge.py index 9ab45de..ac90c8e 100755 --- a/tools/syscap_config_merge.py +++ b/tools/syscap_config_merge.py @@ -152,6 +152,6 @@ if __name__ == '__main__': output_file = args.output full = assemble_header_file(base_file, extern_file) - with os.fdopen(os.open(output_file, os.O_WRONLY | os.O_CREAT, mode=0o640), 'w') as out: + with os.fdopen(os.open(output_file, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, mode=0o640), 'w') as out: out.writelines(full)