commit f40b2da6f45dc71940900e424e99feb027cffc3b
Author: David Gričar <[email protected]>
Date:   Thu Mar 19 11:19:23 2020 +0100

    Make last_dir function more readable

diff --git a/build-page.c b/build-page.c
index f07ef4a8..1eba1ca9 100644
--- a/build-page.c
+++ b/build-page.c
@@ -222,10 +222,8 @@ last_dir(char *this)
                if (*de->d_name == '.')
                        continue;
                snprintf(newdir, sizeof(newdir), this ? "%2$s/%1$s" : "%s", 
de->d_name, this);
-               if (!stat_isdir(newdir))
-                       continue;
-
-               dir = 1;
+               if (stat_isdir(newdir))
+                       dir = 1;
        }
        closedir(dp);
 


Reply via email to