From d40b26e8bd6a8b57b8afe15b7c041121f323f63e Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 25 Feb 2012 19:44:57 +0000 Subject: [PATCH] Bug fix: -osirrox on:sort_lba_on -extract from / restored nearly nothing --- xorriso/disk_ops.c | 12 +++++++++--- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xorriso/disk_ops.c b/xorriso/disk_ops.c index e76fc640..8b3d1e6e 100644 --- a/xorriso/disk_ops.c +++ b/xorriso/disk_ops.c @@ -1667,14 +1667,20 @@ int Xorriso_make_restore_path(struct XorrisO *xorriso, ipfx= Xorriso_lst_get_text(s, 0); li= strlen(ipfx); 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; - if(img_path[li] != 0 && img_path[li] != '/') + } else { + if(strncmp(img_path, ipfx, li) != 0) continue; + if(img_path[li] != 0 && img_path[li] != '/') + continue; + } if(strlen(dpfx) + strlen(img_path) - li + 1 >= SfileadrL) return(-1); 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 strcpy(disk_path, dpfx); found_s= s; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 5ae5f5fe..691ae4ce 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2012.02.25.154938" +#define Xorriso_timestamP "2012.02.25.194514"