Addapt recursive addition function to new replace enum.

This commit is contained in:
Vreixo Formoso 2008-01-12 21:08:25 +01:00
parent f118b0a48d
commit 4da469a3bf
2 changed files with 2 additions and 7 deletions

View File

@ -55,13 +55,8 @@ struct Iso_Image_Rec_Opts
/** /**
* if the dir already contains a node with the same name, whether to * if the dir already contains a node with the same name, whether to
* replace or not the old node with the new. * 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 * When this is not NULL, it is a pointer to a function that will

View File

@ -488,7 +488,7 @@ int iso_add_dir_src_rec(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
flag = 0; flag = 0;
if (iso_dir_exists(parent, name, &pos)) { if (iso_dir_exists(parent, name, &pos)) {
flag = 1; flag = 1;
if (action == 1 && image->recOpts.replace == 0) { if (action == 1 && image->recOpts.replace == ISO_REPLACE_NEVER) {
action = 2; action = 2;
} }
} }