diff options
| author | Jens Schweikhardt <schweikh@FreeBSD.org> | 2003-12-23 15:01:12 +0000 |
|---|---|---|
| committer | Jens Schweikhardt <schweikh@FreeBSD.org> | 2003-12-23 15:01:12 +0000 |
| commit | ecc68fbe47d76d79fdbda89abf2a26a24331ceaf (patch) | |
| tree | b6aef9e035b2b3a0e75c8ab9f4dd3be6f6a2104c | |
| parent | dc75b9e808a375aa9552711fcb5fc3493786b46b (diff) | |
Notes
| -rw-r--r-- | usr.sbin/pkg_install/lib/match.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/match.c b/usr.sbin/pkg_install/lib/match.c index 5312c27c2041..27db97827d50 100644 --- a/usr.sbin/pkg_install/lib/match.c +++ b/usr.sbin/pkg_install/lib/match.c @@ -236,13 +236,14 @@ int isinstalledpkg(const char *name) { char buf[FILENAME_MAX]; + char buf2[FILENAME_MAX]; snprintf(buf, sizeof(buf), "%s/%s", LOG_DIR, name); if (!isdir(buf) || access(buf, R_OK) == FAIL) return FALSE; - snprintf(buf, sizeof(buf), "%s/%s", buf, CONTENTS_FNAME); - if (!isfile(buf) || access(buf, R_OK) == FAIL) + snprintf(buf2, sizeof(buf2), "%s/%s", buf, CONTENTS_FNAME); + if (!isfile(buf2) || access(buf2, R_OK) == FAIL) return FALSE; return TRUE; |
