diff options
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/ls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c index 0956902f..d4c0211a 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -384,7 +384,8 @@ static void listfiles(int dirfd, struct dirtree *indir) memset(colsizes, 0, columns*sizeof(unsigned)); for (ul=0; ul<dtlen; ul++) { entrylen(sort[next_column(ul, dtlen, columns, &c)], len); - *len += totpad+1; + // Add `2` to `totpad` to ensure two spaces between filenames + *len += totpad+2; if (c == columns) break; // Expand this column if necessary, break if that puts us over budget if (*len > colsizes[c]) { |