Skip to content
Snippets Groups Projects
Commit 8ba0c003 authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Merge pull request #3078 from yuanxing-THU/master

Ignore .DS_Store in the ROMFS pruner.
parents 8524a507 f297cf96
No related branches found
No related tags found
No related merge requests found
......@@ -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'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment