Fixed issue where using joliet without Rockridge would create broken iso
This commit is contained in:
parent
8ee6839513
commit
496e027f89
@ -319,6 +319,8 @@ ecma119_target_new(struct iso_volset *volset,
|
|||||||
if (t->joliet)
|
if (t->joliet)
|
||||||
joliet_calc_dir_pos(t, t->joliet_root);
|
joliet_calc_dir_pos(t, t->joliet_root);
|
||||||
calc_file_pos(t, t->root);
|
calc_file_pos(t, t->root);
|
||||||
|
if (t->joliet)
|
||||||
|
joliet_update_file_pos (t, t->joliet_root);
|
||||||
|
|
||||||
if (t->rockridge) {
|
if (t->rockridge) {
|
||||||
susp_finalize(t, t->root);
|
susp_finalize(t, t->root);
|
||||||
|
@ -142,6 +142,30 @@ joliet_calc_dir_pos(struct ecma119_write_target *t,
|
|||||||
t->curfile = 0;
|
t->curfile = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
joliet_update_file_pos(struct ecma119_write_target *t,
|
||||||
|
struct joliet_tree_node *dir)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
assert(dir && ISO_ISDIR(dir->iso_self));
|
||||||
|
for (i = 0; i < dir->nchildren; i++) {
|
||||||
|
struct joliet_tree_node *ch;
|
||||||
|
ch = dir->children[i];
|
||||||
|
|
||||||
|
if (!ISO_ISDIR (ch->iso_self)) {
|
||||||
|
struct iso_tree_node *iso = ch->iso_self;
|
||||||
|
ch->block = iso->block;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
joliet_update_file_pos(t, ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reset curfile when we're finished */
|
||||||
|
if (!dir->parent)
|
||||||
|
t->curfile = 0;
|
||||||
|
}
|
||||||
|
|
||||||
struct joliet_tree_node*
|
struct joliet_tree_node*
|
||||||
joliet_tree_create(struct ecma119_write_target *t,
|
joliet_tree_create(struct ecma119_write_target *t,
|
||||||
struct iso_tree_node *iso_root)
|
struct iso_tree_node *iso_root)
|
||||||
|
@ -52,6 +52,13 @@ joliet_calc_dir_size(struct ecma119_write_target *t, struct joliet_tree_node*);
|
|||||||
void
|
void
|
||||||
joliet_calc_dir_pos(struct ecma119_write_target *t, struct joliet_tree_node*);
|
joliet_calc_dir_pos(struct ecma119_write_target *t, struct joliet_tree_node*);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the position of each file in the joliet hierarchy (to be called
|
||||||
|
* AFTER the file positions in the iso tree have been set).
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
joliet_update_file_pos(struct ecma119_write_target *t, struct joliet_tree_node*);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the size of the joliet path table and fill in the list of
|
* Calculate the size of the joliet path table and fill in the list of
|
||||||
* directories.
|
* directories.
|
||||||
|
Loading…
Reference in New Issue
Block a user