|
|
|
@ -460,8 +460,9 @@ int iso_add_dir_aux(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
|
|
|
|
|
|
|
|
|
|
result = iso_file_source_open(dir);
|
|
|
|
|
if (result < 0) {
|
|
|
|
|
iso_msg_debug(image->messenger, "Can't open dir %s",
|
|
|
|
|
iso_file_source_get_path(dir));
|
|
|
|
|
char *path = iso_file_source_get_path(dir);
|
|
|
|
|
iso_msg_debug(image->messenger, "Can't open dir %s", path);
|
|
|
|
|
free(path);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -469,24 +470,23 @@ int iso_add_dir_aux(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
|
|
|
|
|
action = 1;
|
|
|
|
|
while ( (result = iso_file_source_readdir(dir, &file)) == 1) {
|
|
|
|
|
int flag;
|
|
|
|
|
char *name;
|
|
|
|
|
char *name, *path;
|
|
|
|
|
IsoNode *new;
|
|
|
|
|
|
|
|
|
|
name = iso_file_source_get_name(file);
|
|
|
|
|
path = iso_file_source_get_path(file);
|
|
|
|
|
|
|
|
|
|
if (check_excludes(image, iso_file_source_get_path(file))) {
|
|
|
|
|
iso_msg_debug(image->messenger, "Skipping excluded file %s",
|
|
|
|
|
iso_file_source_get_path(file));
|
|
|
|
|
if (check_excludes(image, path)) {
|
|
|
|
|
iso_msg_debug(image->messenger, "Skipping excluded file %s", path);
|
|
|
|
|
action = 2;
|
|
|
|
|
} else if (check_hidden(image, name)) {
|
|
|
|
|
iso_msg_debug(image->messenger, "Skipping hidden file %s",
|
|
|
|
|
iso_file_source_get_path(file));
|
|
|
|
|
iso_msg_debug(image->messenger, "Skipping hidden file %s", path);
|
|
|
|
|
action = 2;
|
|
|
|
|
} else {
|
|
|
|
|
iso_msg_debug(image->messenger, "Adding file %s",
|
|
|
|
|
iso_file_source_get_path(file));
|
|
|
|
|
iso_msg_debug(image->messenger, "Adding file %s", path);
|
|
|
|
|
action = 1;
|
|
|
|
|
}
|
|
|
|
|
free(path);
|
|
|
|
|
|
|
|
|
|
/* find place where to insert */
|
|
|
|
|
flag = 0;
|
|
|
|
@ -522,10 +522,10 @@ int iso_add_dir_aux(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
|
|
|
|
|
/* ok, file will be added */
|
|
|
|
|
result = builder->create_node(builder, image, file, &new);
|
|
|
|
|
if (result < 0) {
|
|
|
|
|
|
|
|
|
|
char *path = iso_file_source_get_path(file);
|
|
|
|
|
iso_msg_note(image->messenger, LIBISO_FILE_IGNORED,
|
|
|
|
|
"Error %d when adding file %s", result,
|
|
|
|
|
iso_file_source_get_path(file));
|
|
|
|
|
"Error %d when adding file %s", result, path);
|
|
|
|
|
free(path);
|
|
|
|
|
|
|
|
|
|
if (image->recOpts.report) {
|
|
|
|
|
action = image->recOpts.report(file, result, flag);
|
|
|
|
|