Add support for excluding arbitrary files when adding a dir recursively.

This commit is contained in:
Vreixo Formoso
2008-01-29 20:43:59 +01:00
parent 69d0503053
commit ff0dd38e9f
4 changed files with 99 additions and 8 deletions

View File

@ -92,11 +92,19 @@ void iso_image_ref(IsoImage *image)
void iso_image_unref(IsoImage *image)
{
if (--image->refcount == 0) {
int nexcl;
/* we need to free the image */
if (image->user_data != NULL) {
/* free attached data */
image->user_data_free(image->user_data);
}
for (nexcl = 0; nexcl < image->nexcludes; ++nexcl) {
free(image->excludes[nexcl]);
}
free(image->excludes);
iso_node_unref((IsoNode*)image->root);
iso_node_builder_unref(image->builder);
iso_filesystem_unref(image->fs);