Skip to content

Commit 659cb4a

Browse files
committed
Order folders and files
1 parent cbd5252 commit 659cb4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

generator.py

100644100755
+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def size_to_nice_display(size):
5858
for key in currentDictSplitted:
5959
if 0 != len(key):
6060
workOn = workOn[key]["subFolder"]
61+
dirs.sort()
6162
for d in dirs:
6263
if d.startswith("."):
6364
continue
@@ -70,6 +71,7 @@ def size_to_nice_display(size):
7071
"mDate": datetime.datetime.fromtimestamp(os.path.getmtime(os.path.join(root, d))).strftime('%Y-%m-%d %H:%M:%S')
7172
}
7273
dirs[:] = [d for d in dirs if not d.startswith(".")]
74+
files.sort()
7375
for f in files:
7476
workOn[f] = {
7577
"isDir": False,

0 commit comments

Comments
 (0)