Skip to content

Commit

Permalink
Properly display size of files in directory listing
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed May 23, 2018
1 parent 5c21a54 commit 57c03d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@ const renderDirectory = async (current, relativePath, absolutePath, handlers, co
details.isDirectory = true;
} else {
details.ext = details.ext.split('.')[1] || 'txt';
details.size = bytes(stats.size, {unitSeparator: ' '});

details.size = bytes(stats.size, {
unitSeparator: ' ',
decimalPlaces: 0
});
}

details.title = details.base;
Expand Down

0 comments on commit 57c03d3

Please sign in to comment.