summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-07-24 11:17:50 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-07-24 11:18:02 +0300
commit2a44df64cf4c4d04394d1b0894b21e35736a3f49 (patch)
tree1ccce9f545443b7aa385f3bc6246e25266d400b4 /build.c
parent6df78d16a68ff508a965ba2166f3b376e850b138 (diff)
downloadrpm-2a44df64cf4c4d04394d1b0894b21e35736a3f49.tar.gz
rpm-2a44df64cf4c4d04394d1b0894b21e35736a3f49.tar.bz2
rpm-2a44df64cf4c4d04394d1b0894b21e35736a3f49.zip
Dumb thinko breaking tar builds from relative paths (rhbz#456321)
Diffstat (limited to 'build.c')
-rw-r--r--build.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/build.c b/build.c
index bdbdfef14..faa09c557 100644
--- a/build.c
+++ b/build.c
@@ -195,11 +195,12 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
/* Make the directory of the tarball %_sourcedir for this run */
/* dirname() may modify contents so extra hoops needed. */
if (*arg != '/') {
- srcdir = dir = rpmGetCwd();
+ dir = rpmGetCwd();
+ rstrscat(&dir, "/", arg, NULL);
} else {
dir = xstrdup(arg);
- srcdir = dirname(dir);
}
+ srcdir = dirname(dir);
addMacro(NULL, "_sourcedir", NULL, srcdir, RMIL_TARBALL);
free(dir);
} else {