Bug fix: Setting file content filters did not mark image as changed for commit

This commit is contained in:
Thomas Schmitt 2012-03-03 10:46:16 +00:00
parent 7156827557
commit 7c42bd8a17
2 changed files with 9 additions and 2 deletions

View File

@ -261,7 +261,7 @@ ex:;
int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
char *path, char *filter_name, int flag)
{
int ret, strip_suffix= 0, strip_filter= 0, filter_ret= 0;
int ret, strip_suffix= 0, strip_filter= 0, filter_ret= 0, did_work= 0;
int explicit_suffix= 0, internal_filter= 0;
IsoNode *node;
IsoFile *file;
@ -369,6 +369,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
ret= iso_file_remove_filter(file, 0);
if(ret != 1)
break;
did_work= 1;
}
filter_ret= 1;
} else if (internal_filter == 1 || internal_filter == 2) {
@ -379,6 +380,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
Xorriso_report_iso_error(xorriso, "", filter_ret,
"Error when setting filter to ISO node", 0, "FAILURE", 1);
}
did_work= 1;
} else if (internal_filter == 3 || internal_filter == 4) {
filter_ret = iso_file_add_gzip_filter(file,
1 | ((internal_filter == 4) << 1));
@ -387,6 +389,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
Xorriso_report_iso_error(xorriso, "", filter_ret,
"Error when setting filter to ISO node", 0, "FAILURE", 1);
}
did_work= 1;
} else {
#ifndef Xorriso_allow_extf_suiD
@ -407,6 +410,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
Xorriso_report_iso_error(xorriso, "", filter_ret,
"Error when setting filter to ISO node", 0, "FAILURE", 1);
}
did_work= 1;
}
if(filter_ret != 1 && new_name[0] && old_name != NULL) {
ret = iso_node_set_name(node, old_name);
@ -416,6 +420,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
Xorriso_report_iso_error(xorriso, "", ret,
"Error when renaming ISO node", 0, "FAILURE", 1);
}
did_work= 1;
}
if(flag & 2) {
xorriso->pacifier_count++;
@ -428,6 +433,8 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
ret= filter_ret;
ex:;
if(did_work)
Xorriso_set_change_pending(xorriso, 0);
if(old_name != NULL)
free(old_name);
Xorriso_free_meM(new_name);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.02.29.135454"
#define Xorriso_timestamP "2012.03.03.104637"