Mercurial > hg > toybox
changeset 663:60cbc87c4314
I screwed up ls in commit 580. Oops. Fix it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 06 Sep 2012 19:49:40 -0500 |
parents | 5cb41d56f9d3 |
children | c60ac785784f |
files | toys/posix/ls.c |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/posix/ls.c Thu Sep 06 03:10:18 2012 -0500 +++ b/toys/posix/ls.c Thu Sep 06 19:49:40 2012 -0500 @@ -186,15 +186,14 @@ 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