diff options
author | Ludovic Courtès <ludo@gnu.org> | 2006-03-08 12:21:39 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2006-03-08 12:21:39 +0000 |
commit | 3ff45223dddf4d31b336589498e0b31b8e703017 (patch) | |
tree | ae7be6971a611d248fd4939a526502400cbf653b /tar.c | |
parent | 482b4ca7291b1b66019392bda25f20ebed2a81e5 (diff) |
Fixed value of `st_blocks' (Ben Asselstine).
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -173,6 +173,10 @@ tar_header2stat (io_statbuf_t *st, tar_record_t *header) } //st->st_size = hstat.st_size; st->st_size = from_oct (1 + 12, header->header.size); + if (st->st_size > 0) + st->st_blocks = ((st->st_size - 1) / 512) + 1; + else + st->st_blocks = 0; st->st_mtime = from_oct (1 + 12, header->header.mtime); st->st_atime = from_oct (1 + 12, header->header.atime); st->st_ctime = from_oct (1 + 12, header->header.ctime); |