Merge pull request #62 from 0xb8/fix-61

Fix segfaults when opening directories with empty files
pull/65/head
Adrian Perez 2016-12-08 15:12:51 +02:00 committed by GitHub
commit 57ff1a2a89
1 changed files with 1 additions and 1 deletions

View File

@ -997,7 +997,7 @@ make_content_buf(
/* If we are showing the filesize in bytes, do not show a decimal */
if (j == DIM(sizes) - 1)
b->last = ngx_sprintf(b->last, "%d %s", length, sizes[j]);
b->last = ngx_sprintf(b->last, "%O %s", length, sizes[j]);
else
b->last = ngx_sprintf(b->last, "%.1f %s",
(float) length / multiplier, sizes[j]);