Bug fix: -osirrox on:sort_lba_on -extract from / restored nearly nothing

This commit is contained in:
Thomas Schmitt 2012-02-25 19:44:57 +00:00
parent 9d1b2fc530
commit 7827017886
2 changed files with 10 additions and 4 deletions

View File

@ -1667,14 +1667,20 @@ int Xorriso_make_restore_path(struct XorrisO *xorriso,
ipfx= Xorriso_lst_get_text(s, 0); ipfx= Xorriso_lst_get_text(s, 0);
li= strlen(ipfx); li= strlen(ipfx);
dpfx= Xorriso_lst_get_text(d, 0); dpfx= Xorriso_lst_get_text(d, 0);
if(strncmp(img_path, ipfx, li) != 0) if(li == 1 && ipfx[0] == '/') {
li= 0;
if(img_path[0] != '/')
continue; continue;
if(img_path[li] != 0 && img_path[li] != '/') } else {
if(strncmp(img_path, ipfx, li) != 0)
continue; continue;
if(img_path[li] != 0 && img_path[li] != '/')
continue;
}
if(strlen(dpfx) + strlen(img_path) - li + 1 >= SfileadrL) if(strlen(dpfx) + strlen(img_path) - li + 1 >= SfileadrL)
return(-1); return(-1);
if(img_path[li]=='/') if(img_path[li]=='/')
sprintf(disk_path, "%s/%s", dpfx, img_path + strlen(ipfx) + 1); sprintf(disk_path, "%s/%s", dpfx, img_path + li + 1);
else else
strcpy(disk_path, dpfx); strcpy(disk_path, dpfx);
found_s= s; found_s= s;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.02.25.154938" #define Xorriso_timestamP "2012.02.25.194514"