From 4da469a3bf2013be6aec347e531ea424a7b23234 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Sat, 12 Jan 2008 21:08:25 +0100 Subject: [PATCH] Addapt recursive addition function to new replace enum. --- src/image.h | 7 +------ src/tree.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/image.h b/src/image.h index 5e13af1..c73798b 100644 --- a/src/image.h +++ b/src/image.h @@ -55,13 +55,8 @@ struct Iso_Image_Rec_Opts /** * if the dir already contains a node with the same name, whether to * replace or not the old node with the new. - * - 0 not replace - * - 1 replace - * TODO #00006 define more values - * to replace only if both are the same kind of file - * if both are dirs, add contents (and what to do with conflicts?) */ - int replace; + enum iso_replace_mode replace; /** * When this is not NULL, it is a pointer to a function that will diff --git a/src/tree.c b/src/tree.c index b584dc6..5b73a79 100644 --- a/src/tree.c +++ b/src/tree.c @@ -488,7 +488,7 @@ int iso_add_dir_src_rec(IsoImage *image, IsoDir *parent, IsoFileSource *dir) flag = 0; if (iso_dir_exists(parent, name, &pos)) { flag = 1; - if (action == 1 && image->recOpts.replace == 0) { + if (action == 1 && image->recOpts.replace == ISO_REPLACE_NEVER) { action = 2; } }