Browse Source

Joliet also need directory sizes to be a multiple of block size.

release-1.5.4.branch
Vreixo Formoso 15 years ago
parent
commit
9ad9b10c67
  1. 8
      src/joliet.c

8
src/joliet.c

@ -339,6 +339,14 @@ size_t calc_dir_size(Ecma119Image *t, JolietNode *dir)
len += dirent_len;
}
}
/*
* The size of a dir is always a multiple of block size, as we must add
* the size of the unused space after the last directory record
* (ECMA-119, 6.8.1.3)
*/
len = div_up(len, BLOCK_SIZE) * BLOCK_SIZE;
/* cache the len */
dir->info.dir.len = len;
return len;

Loading…
Cancel
Save