summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-08-29 15:39:55 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-08-29 15:39:55 +0300
commit412f9fcb17f7d8080eb379e19f208bd1c863ce77 (patch)
tree06bc66c1df26875b7d3f471cae755908c8dcec8c /build.c
parent29d53ac70f14750fbff1329c37c832e48f68254a (diff)
downloadlibrpm-tizen-412f9fcb17f7d8080eb379e19f208bd1c863ce77.tar.gz
librpm-tizen-412f9fcb17f7d8080eb379e19f208bd1c863ce77.tar.bz2
librpm-tizen-412f9fcb17f7d8080eb379e19f208bd1c863ce77.zip
Fix various cases of build failing due to whitespace in dir/filenames.
Diffstat (limited to 'build.c')
-rw-r--r--build.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.c b/build.c
index 552afa2a8..f3c429cc2 100644
--- a/build.c
+++ b/build.c
@@ -149,7 +149,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
(void) isCompressed(arg, &res);
cmd = alloca(strlen(arg) + 50 + strlen(tmpSpecFile));
- sprintf(cmd, "%s < %s | tar xOvf - Specfile 2>&1 > %s",
+ sprintf(cmd, "%s < '%s' | tar xOvf - Specfile 2>&1 > '%s'",
zcmds[res & 0x3], arg, tmpSpecFile);
if (!(fp = popen(cmd, "r"))) {
rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n"));
@@ -161,7 +161,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
/* Try again */
(void) pclose(fp);
- sprintf(cmd, "%s < %s | tar xOvf - --wildcards \\*.spec 2>&1 > %s",
+ sprintf(cmd, "%s < '%s' | tar xOvf - --wildcards \\*.spec 2>&1 > '%s'",
zcmds[res & 0x3], arg, tmpSpecFile);
if (!(fp = popen(cmd, "r"))) {
rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n"));