From 6bf0b7c2020a31e07972a830b42e26bdaca40816 Mon Sep 17 00:00:00 2001 From: sumitbot Date: Sun, 21 Jun 2020 19:32:03 +0530 Subject: [PATCH] upload file sorted by name if path is directory (#69) * upload file sorted by name if path is directory * Update upload.py --- userge/plugins/misc/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userge/plugins/misc/upload.py b/userge/plugins/misc/upload.py index b3333fea3..ef849ecdf 100644 --- a/userge/plugins/misc/upload.py +++ b/userge/plugins/misc/upload.py @@ -190,7 +190,7 @@ async def explorer(path: Path, chatid, flags, del_path): except FloodWait as x: time.sleep(x.x) # asyncio sleep ? elif path.is_dir(): - for i in path.iterdir(): + for i in sorted(path.iterdir()): await explorer(i, chatid, flags, del_path)