mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 19:57:12 +08:00
romfs pruner: do not try to prune .swp files
This commit is contained in:
@@ -43,6 +43,7 @@ from __future__ import print_function
|
||||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
# Parse commandline arguments
|
||||
@@ -56,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:
|
||||
if ".zip" in file or ".bin" or ".swp" in file:
|
||||
continue
|
||||
|
||||
file_path = os.path.join(root, file)
|
||||
@@ -64,7 +65,7 @@ def main():
|
||||
# read file line by line
|
||||
pruned_content = ""
|
||||
with open(file_path, "r") as f:
|
||||
for line in f:
|
||||
for line in f:
|
||||
|
||||
# handle mixer files differently than startup files
|
||||
if file_path.endswith(".mix"):
|
||||
|
||||
Reference in New Issue
Block a user