Reporting target name if adding of new node fails with ISO_WRONG_ARG_VALUE

This commit is contained in:
Thomas Schmitt 2011-03-26 10:05:05 +00:00
parent d0bce05577
commit 548c0c4efd
2 changed files with 7 additions and 3 deletions

View File

@ -166,7 +166,7 @@ int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
{ {
int ret, stbuf_valid= 0; int ret, stbuf_valid= 0;
struct stat stbuf; struct stat stbuf;
char sfe[5*SfileadrL]; char sfe[5*SfileadrL], *namept;
off_t size= 0; off_t size= 0;
if(lstat(disk_path, &stbuf) != -1) { if(lstat(disk_path, &stbuf) != -1) {
@ -227,7 +227,11 @@ int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
ex:; ex:;
if(ret<0) { if(ret<0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
Xorriso_report_iso_error(xorriso, nominal_source, ret, if(ret == ISO_WRONG_ARG_VALUE)
namept= nominal_target;
else
namept= nominal_source;
Xorriso_report_iso_error(xorriso, namept, ret,
"Cannot add node to tree", 0, "FAILURE", 1|2); "Cannot add node to tree", 0, "FAILURE", 1|2);
return(ret); return(ret);
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.03.25.191936" #define Xorriso_timestamP "2011.03.26.100519"