From cc3dcec01f38fde8689e0ba52c80f9d0f6fbc303 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Wed, 8 Nov 2023 11:05:15 +0100 Subject: [PATCH] utils:functions - sort results of find_files --- acacore/utils/functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acacore/utils/functions.py b/acacore/utils/functions.py index 10a2775..f8668e9 100644 --- a/acacore/utils/functions.py +++ b/acacore/utils/functions.py @@ -64,7 +64,7 @@ def find_files(*root: Path, exclude: Optional[list[Path]] = None) -> Generator[P elif f.is_file(): yield f elif f.is_dir(): - yield from find_files(*f.iterdir(), exclude=exclude) + yield from find_files(*sorted(f.iterdir()), exclude=exclude) def file_checksum(path: Path) -> str: