summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-12 09:44:27 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-12 09:44:27 -0400
commited2a50d63b25a7b72a32be07a33331544f587296 (patch)
tree340395e3fb58fe5f82a4258a5bfcba9cb1ec9f1c /src
parent778659e5fc758515428db40c353f45b201264802 (diff)
downloadbfs-ed2a50d63b25a7b72a32be07a33331544f587296.tar.xz
bftw: Let iterative deepening work depth-first when sorting
Diffstat (limited to 'src')
-rw-r--r--src/bftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bftw.c b/src/bftw.c
index 902a3fa..c58001d 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -862,7 +862,7 @@ static bool bftw_pop_dir(struct bftw_state *state) {
if (state->flags & BFTW_SORT) {
// Keep strict breadth-first order when sorting
- if (state->strategy != BFTW_DFS && have_files) {
+ if (state->strategy == BFTW_BFS && have_files) {
return false;
}
} else {