diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-10 11:19:40 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-10 11:19:40 +0300 |
commit | de8250d2dfe74cdd0637dda3000b0ff6d7e730be (patch) | |
tree | 7db3791e6a0eecc8beefaffa4c0b9f2d1db74080 | |
parent | 61b008b5662652ac8ea05ea76611b73efe9cf656 (diff) | |
download | rpm-de8250d2dfe74cdd0637dda3000b0ff6d7e730be.tar.gz rpm-de8250d2dfe74cdd0637dda3000b0ff6d7e730be.tar.bz2 rpm-de8250d2dfe74cdd0637dda3000b0ff6d7e730be.zip |
Unbreak srpm generation broken by 6c4b0cbd93709a0fa18af1ef07af44da585bb5f6
- cpio path in source packages is the basename of the file, make this
obvious by using basename() instead of pointer games
-rw-r--r-- | build/files.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/build/files.c b/build/files.c index b21c8023c..56e62cd4f 100644 --- a/build/files.c +++ b/build/files.c @@ -2147,6 +2147,7 @@ int processSourceFiles(rpmSpec spec) x = 0; for (fp = files; *fp != NULL; fp++) { const char *diskPath; + char *tmp; FileListRec flp; diskPath = *fp; @@ -2163,13 +2164,11 @@ int processSourceFiles(rpmSpec spec) diskPath++; } + tmp = xstrdup(diskPath); /* basename() might modify */ flp->diskPath = xstrdup(diskPath); - diskPath = strrchr(diskPath, '/'); - if (diskPath) - diskPath++; - - flp->cpioPath = xstrdup(diskPath); + flp->cpioPath = xstrdup(basename(tmp)); flp->verifyFlags = RPMVERIFY_ALL; + free(tmp); if (stat(diskPath, &flp->fl_st)) { rpmlog(RPMLOG_ERR, _("Bad file: %s: %s\n"), |