From: Arun Prakash Jana Date: Sun, 14 Nov 2021 19:03:25 +0000 (+0530) Subject: More frequent interrupt handling during du X-Git-Tag: v4.4~4 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f66183937d3c6f36fc9533ff5777e7c236903747;p=nnn.git More frequent interrupt handling during du The check is done when traversing directories in preorder i.e before the files inside are enumerated. Postorder traversal is unwinding, so mostly we are done with the calculation and finishing off the thread. --- diff --git a/src/nnn.c b/src/nnn.c index c7440149..952e4e58 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5486,8 +5486,11 @@ static void *du_thread(void *p_data) FTSENT *node; while ((node = fts_read(tree))) { - if (node->fts_info & FTS_D) + if (node->fts_info & FTS_D) { + if (g_state.interrupt) + break; continue; + } sb = node->fts_statp;