fat16copy: Sort new directory entries.
Sort the entries returned by os.listdir to give a consistent ordering
across build.
Bug: None
Test: `make dist`
(cherry picked from commit ef34e5dca216e61fd81020e818f247f6ce47d26e)
Change-Id: I2f80889684f108208f07e13d725acaa7bc0ab099
diff --git a/tools/fat16copy.py b/tools/fat16copy.py
index 77500eb..f49c4fe 100755
--- a/tools/fat16copy.py
+++ b/tools/fat16copy.py
@@ -787,7 +787,7 @@
if len(base) == 0:
base = os.path.basename(item[:-1])
sub = directory.new_subdirectory(base)
- for next_item in os.listdir(item):
+ for next_item in sorted(os.listdir(item)):
add_item(sub, os.path.join(item, next_item))
else:
with open(item, 'rb') as f: