Browse Source

Addapt recursive addition function to new replace enum.

release-1.5.4.branch
Vreixo Formoso 15 years ago
parent
commit
4da469a3bf
  1. 7
      src/image.h
  2. 2
      src/tree.c

7
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

2
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;
}
}

Loading…
Cancel
Save