diff --git a/graphify/detect.py b/graphify/detect.py index 36a0a184..a3af585a 100644 --- a/graphify/detect.py +++ b/graphify/detect.py @@ -930,6 +930,8 @@ def detect(root: Path, *, follow_symlinks: bool | None = None, google_workspace: seen.add(p) all_files.append(p) + all_files.sort(key=lambda p: str(p)) + converted_dir = root / "graphify-out" / "converted" for p in all_files: @@ -983,6 +985,9 @@ def detect(root: Path, *, follow_symlinks: bool | None = None, google_workspace: if ftype != FileType.VIDEO: total_words += count_words(p) + for ftype in files: + files[ftype].sort() + total_files = sum(len(v) for v in files.values()) needs_graph = total_words >= CORPUS_WARN_THRESHOLD