aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-09-04 10:51:17 -0700
committerRob Landley <rob@landley.net>2019-09-04 15:54:44 -0500
commit935980346f62febe9ed2bf029b55e0111fe1b073 (patch)
tree11cc428b3558b60a7f7d09eb57bbda16dbfa4bb3 /toys/posix
parent5be1c0ff22b55887b4d82c2cbbff79d9b5f45791 (diff)
downloadtoybox-935980346f62febe9ed2bf029b55e0111fe1b073.tar.gz
ls: fix -Z, add a test.
This broke a netd test (but sadly in postsubmit rather than presubmit). Also add a trivial test that would at least have caught this bug. Bug: http://b/140453237
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index 65031587..25b77ad7 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -467,7 +467,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
}
}
if (flags & FLAG_Z)
- printf(" %-*s", -(int)totals[7], (char *)sort[next]->extra);
+ printf("%-*s ", -(int)totals[7], (char *)sort[next]->extra);
if (flags & (FLAG_l|FLAG_o|FLAG_n|FLAG_g)) {
struct tm *tm;