From f297cf96f7aa143747b41f9e1f0fb6744684c816 Mon Sep 17 00:00:00 2001 From: skyworks_zyx Date: Tue, 27 Oct 2015 19:23:02 +0800 Subject: [PATCH] Ignore .DS_Store in the ROMFS pruner. --- Tools/px_romfs_pruner.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tools/px_romfs_pruner.py b/Tools/px_romfs_pruner.py index 85ff678b93..1fa1efbd90 100644 --- a/Tools/px_romfs_pruner.py +++ b/Tools/px_romfs_pruner.py @@ -57,7 +57,7 @@ def main(): for (root, dirs, files) in os.walk(args.folder): for file in files: # only prune text files - if ".zip" in file or ".bin" in file or ".swp" in file or ".data" in file: + if ".zip" in file or ".bin" in file or ".swp" in file or ".data" in file or ".DS_Store" in file: continue file_path = os.path.join(root, file) @@ -74,8 +74,7 @@ def main(): else: if not line.isspace() and not line.strip().startswith("#"): pruned_content += line - - # overwrite old scratch file + # overwrite old scratch file with open(file_path, "wb") as f: f.write(pruned_content.encode("ascii", errors='strict'))