diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-10 23:00:07 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-10 23:00:07 +0000 |
commit | 6e78c7b340089cbe39a50a2c0a190937ea1c9ada (patch) | |
tree | 6ac672a72f1763662eec275a7d54e89ad6b4b6b4 /usr.sbin/pkg_install/info/perform.c | |
parent | 2093ba9e8f522f684222acb75fdd3e999c043029 (diff) | |
download | FreeBSD-src-6e78c7b340089cbe39a50a2c0a190937ea1c9ada.zip FreeBSD-src-6e78c7b340089cbe39a50a2c0a190937ea1c9ada.tar.gz |
Fix a long-standing bug that broke pkg_info utterly and probably made
pkg_add a little wiggy too. Document the fact that pkg_info can also
take a URL.
Diffstat (limited to 'usr.sbin/pkg_install/info/perform.c')
-rw-r--r-- | usr.sbin/pkg_install/info/perform.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c index f43da33..f039416 100644 --- a/usr.sbin/pkg_install/info/perform.c +++ b/usr.sbin/pkg_install/info/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: perform.c,v 1.13 1995/04/26 15:08:02 jkh Exp $"; +static const char *rcsid = "$Id: perform.c,v 1.14 1995/04/28 18:24:31 jkh Exp $"; #endif /* @@ -94,10 +94,14 @@ pkg_do(char *pkg) else if (fexists(pkg)) { int len; - if (!getcwd(fname, FILENAME_MAX)) - upchuck("getcwd"); - len = strlen(fname); - snprintf(&fname[len], FILENAME_MAX - len, "/%s", pkg); + if (*pkg != '/') { + if (!getcwd(fname, FILENAME_MAX)) + upchuck("getcwd"); + len = strlen(fname); + snprintf(&fname[len], FILENAME_MAX - len, "/%s", pkg); + } + else + strcpy(fname, pkg); cp = fname; } else { |