]> Sergey Matveev's repositories - nnn.git/commitdiff
Do not apply filter if directory is empty
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 15 Jul 2021 20:24:15 +0000 (01:54 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 15 Jul 2021 20:24:15 +0000 (01:54 +0530)
src/nnn.c

index 499073e5955ac4a32351e7a9f6e244d4afb5a47c..3d866bf480f599dad44f4b020f5a9b1eec7804a8 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6868,6 +6868,8 @@ nochange:
                        printwait(mark, &presel);
                        goto nochange;
                case SEL_FLTR:
+                       if (!ndents)
+                               goto nochange;
                        /* Unwatch dir if we are still in a filtered view */
 #ifdef LINUX_INOTIFY
                        if (inotify_wd >= 0) {