From a1bc4b80a77e058cb14afbd53563e8ad7ad8e77f Mon Sep 17 00:00:00 2001 From: night0721 Date: Tue, 2 Apr 2024 00:26:52 +0000 Subject: [PATCH] fix mark all resulting empty directory --- ccc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ccc.c b/ccc.c index 0550362..ca8ab0e 100644 --- a/ccc.c +++ b/ccc.c @@ -457,8 +457,10 @@ void change_dir(const char *buf, int selection, int ftype) buf_dup = (char *) buf; } strcpy(cwd, buf_dup); - arraylist_free(files); - files = arraylist_init(100); + if (ftype != 2) { + arraylist_free(files); + files = arraylist_init(100); + } current_selection = selection; populate_files(cwd, ftype); }