From f070b5da0340235fc58b011fe43b8d44c6197463 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 28 May 2019 22:30:04 -0700 Subject: Adding comment about . --- bb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bb.c b/bb.c index 0193dc2..f716a14 100644 --- a/bb.c +++ b/bb.c @@ -562,6 +562,7 @@ int compare_files(void *v, const void *v1, const void *v2) char sort = bb->options['s']; int sign = bb->options['r'] ? -1 : 1; const entry_t *f1 = *((const entry_t**)v1), *f2 = *((const entry_t**)v2); + // *always* put ".." before everything else int diff = (strcmp(f1->name, "..") == 0) - (strcmp(f2->name, "..") == 0); if (diff) return -diff; if (!bb->options['i']) { -- cgit v1.2.3