We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
readdir
1 parent bb5e177 commit 4eb1b05Copy full SHA for 4eb1b05
tests/test_unasync.py
@@ -19,6 +19,11 @@
19
def list_files(startpath):
20
output = ""
21
for root, dirs, files in os.walk(startpath):
22
+ # Ensure that we do not capture the directory inode order on
23
+ # platforms that don't pre-sort `readdir` results
24
+ dirs.sort()
25
+ files.sort()
26
+
27
level = root.replace(startpath, "").count(os.sep)
28
indent = " " * 4 * (level)
29
output += "{}{}/".format(indent, os.path.basename(root))
0 commit comments