Bug fix: Boot catalog could get a wrong name if cat_path= is explicitely given but not containing a slash character
This commit is contained in:
@ -692,10 +692,12 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
|
||||
if(xorriso->boot_image_cat_path[0] == 0) {
|
||||
strcpy(xorriso->boot_image_cat_path, bin_path);
|
||||
cpt= strrchr(xorriso->boot_image_cat_path, '/');
|
||||
if(cpt == NULL)
|
||||
cpt= xorriso->boot_image_cat_path;
|
||||
else
|
||||
if(cpt == NULL) {
|
||||
strcpy(xorriso->boot_image_cat_path, "/");
|
||||
cpt= xorriso->boot_image_cat_path + 1;
|
||||
} else {
|
||||
cpt++;
|
||||
}
|
||||
strcpy(cpt, "boot.cat");
|
||||
}
|
||||
ret= Xorriso_node_from_path(xorriso, image, xorriso->boot_image_cat_path,
|
||||
@ -1261,7 +1263,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
if(ret > 0) {
|
||||
if(strcmp(sfe, xorriso->boot_image_cat_path) != 0) {
|
||||
ret= Xorriso_rename(xorriso, NULL, sfe,
|
||||
xorriso->boot_image_cat_path, 0);
|
||||
xorriso->boot_image_cat_path, 1);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
}
|
||||
|
Reference in New Issue
Block a user