Unbreak cpio archive path generation
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 29 Mar 2010 07:59:58 +0000 (10:59 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 29 Mar 2010 07:59:58 +0000 (10:59 +0300)
- fixes regression from commit 45e2d4e1d0260a9c07eb1daf0c68b82f602ad16f
- striplen was never set on build at all, and the psm part was unused
  too - either unused since forever or possibly related to repackaging

lib/fsm.c

index 3b9a4c4..01d5f1e 100644 (file)
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -874,8 +874,7 @@ static int writeFile(FSM_t fsm, int writeData)
                                   fsm->dirName, fsm->baseName, NULL);
     } else if (fsm->mapFlags & CPIO_MAP_PATH) {
        rpmfi fi = fsmGetFi(fsm);
-       int striplen = 1; /* strip leading / from archive paths */
-       fsm->path = xstrdup((fi->apath ? fi->apath[fsm->ix] + striplen : 
+       fsm->path = xstrdup((fi->apath ? fi->apath[fsm->ix] : 
                                         rpmfiBNIndex(fi, fsm->ix)));
     }