Corrected ugly message with -update_r and root directory

This commit is contained in:
Thomas Schmitt 2008-05-17 16:27:50 +00:00
parent 3b50cc3378
commit b30fc79edb
3 changed files with 14 additions and 7 deletions

View File

@ -8214,10 +8214,10 @@ int Xorriso_option_compare(struct XorrisO *xorriso, char *disk_path,
if(ipth[0]==0) if(ipth[0]==0)
ipth= disk_path; ipth= disk_path;
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_origin, ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_origin,
2|4); 2|4|8);
if(ret<=0) if(ret<=0)
return(ret); return(ret);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2); ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2|8);
if(ret<=0) if(ret<=0)
return(ret); return(ret);
@ -10793,10 +10793,10 @@ int Xorriso_option_update(struct XorrisO *xorriso, char *disk_path,
if(ipth[0]==0) if(ipth[0]==0)
ipth= disk_path; ipth= disk_path;
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_origin, ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_origin,
2|4); 2|4|8);
if(ret<=0) if(ret<=0)
return(ret); return(ret);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2); ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2|8);
if(ret<=0) if(ret<=0)
return(ret); return(ret);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.05.15.192118" #define Xorriso_timestamP "2008.05.17.162753"

View File

@ -1329,6 +1329,7 @@ int Xorriso_node_from_path(struct XorrisO *xorriso, IsoImage *volume,
@param flag bit0= do not produce problem events (unless faulty path format) @param flag bit0= do not produce problem events (unless faulty path format)
bit1= work purely literally, do not use libisofs bit1= work purely literally, do not use libisofs
bit2= (with bit1) this is an address in the disk world bit2= (with bit1) this is an address in the disk world
bit3= return root directory as "/" and not as ""
@return -1 = faulty path format, 0 = not found , @return -1 = faulty path format, 0 = not found ,
1 = found simple node , 2 = found directory 1 = found simple node , 2 = found directory
*/ */
@ -1342,8 +1343,11 @@ int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd,
char path[SfileadrL], *apt, *npt, sfe[5*SfileadrL], *cpt; char path[SfileadrL], *apt, *npt, sfe[5*SfileadrL], *cpt;
eff_path[0]= 0; eff_path[0]= 0;
if(img_path[0]==0) if(img_path[0]==0) {
if(flag&8)
strcpy(eff_path, "/");
return(2); /* root directory */ return(2); /* root directory */
}
if(!(flag&2)) { if(!(flag&2)) {
ret= Xorriso_get_volume(xorriso, &volume, 0); ret= Xorriso_get_volume(xorriso, &volume, 0);
@ -1367,8 +1371,11 @@ int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd,
img_path); img_path);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FATAL", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FATAL", 0);
return(-1); return(-1);
} else if(path[1]==0) } else if(path[1]==0) {
if(flag&8)
strcpy(eff_path, "/");
return(2); /* root directory */ return(2); /* root directory */
}
for(npt= apt; !done; apt= npt+1) { for(npt= apt; !done; apt= npt+1) {
npt= strchr(apt, '/'); npt= strchr(apt, '/');