Implement function to recursively add a dir to an iso tree.

This commit also to the following changes:
- create_node() on builder never frees the IsoFileSource, it is responsability 
  of the caller to free it.
- Recursive addition options added to IsoImage (not exposed to public API yet)
- create_node() takes care about follow_symlinks
- Added little demo program to test it.
This commit is contained in:
Vreixo Formoso
2007-12-11 22:47:04 +01:00
parent 0306bb5daf
commit d10ed353e2
9 changed files with 426 additions and 7 deletions

View File

@@ -77,6 +77,16 @@ int iso_image_new(const char *name, IsoImage **image)
return res;
}
img->refcount = 1;
img->recOpts = calloc(1,sizeof(IsoImageRecOpts));
if (img->recOpts == NULL) {
libiso_msgs_destroy(&img->messenger, 0);
iso_node_builder_unref(img->builder);
iso_filesystem_unref(img->fs);
iso_node_unref((IsoNode*)img->root);
free(img);
return ISO_MEM_ERROR;
}
if (name != NULL) {
img->volset_id = strdup(name);
img->volume_id = strdup(name);