From 85dd282b08eb378b4b8cc275f96226dc2c151216 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 6 Sep 2012 19:49:40 -0500 Subject: I screwed up ls in commit 580. Oops. Fix it. --- toys/posix/ls.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/toys/posix/ls.c b/toys/posix/ls.c index d6671923..a68533ff 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -186,15 +186,14 @@ static int filter(struct dirtree *new) return 0; } - if (!(flags&FLAG_f)) { - if (flags & FLAG_a) return 0; - if (!(flags & FLAG_A) && new->name[0]=='.') return 0; - } - if (flags & FLAG_u) new->st.st_mtime = new->st.st_atime; if (flags & FLAG_c) new->st.st_mtime = new->st.st_ctime; if (flags & FLAG_k) new->st.st_blocks = (new->st.st_blocks + 1) / 2; - return dirtree_notdotdot(new); + + if (flags & (FLAG_a|FLAG_f)) return DIRTREE_SAVE; + if (!(flags & FLAG_A) && new->name[0]=='.') return 0; + + return dirtree_notdotdot(new) & DIRTREE_SAVE; } // For column view, calculate horizontal position (for padding) and return -- cgit v1.2.3