From 441fceb55ba93475b1a1ff90ebca39da2c437123 Mon Sep 17 00:00:00 2001 From: ewt Date: Tue, 11 Mar 1997 17:10:04 +0000 Subject: [PATCH] -ta didn't handle absolute paths to tar files properly CVS patchset: 1482 CVS date: 1997/03/11 17:10:04 --- rpm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rpm.c b/rpm.c index 342fe90..a504577 100755 --- a/rpm.c +++ b/rpm.c @@ -390,10 +390,13 @@ static int build(char *arg, int buildAmount, char *passPhrase, /* Make the directory which contains the tarball the source directory for this run */ - /* XXX this is broken if PWD is near 1024 */ - getcwd(buf, 1024); - strcat(buf, "/"); - strcat(buf, arg); + if (*arg != '/') { + /* XXX this is broken if PWD is near 1024 */ + getcwd(buf, 1024); + strcat(buf, "/"); + strcat(buf, arg); + } else + strcpy(buf, arg); cmd = buf + strlen(buf) - 1; while (*cmd != '/') cmd--; -- 2.7.4