Ignore .DS_Store in the ROMFS pruner.

This commit is contained in:
skyworks_zyx 2015-10-27 19:23:02 +08:00
parent 0106be3e89
commit f297cf96f7
1 changed files with 2 additions and 3 deletions

View File

@ -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,7 +74,6 @@ def main():
else:
if not line.isspace() and not line.strip().startswith("#"):
pruned_content += line
# overwrite old scratch file
with open(file_path, "wb") as f:
f.write(pruned_content.encode("ascii", errors='strict'))