summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-10 03:33:22 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-10 03:33:22 +0000
commitfeaa668f73c2ceb6477df152becd63debd7d1edc (patch)
tree7329cd99cb7ddecf2fba829cc8db99abd2d82556 /usr.bin
parentfcae108aced47b063b6d01aaa2619be7b610c08f (diff)
pass the basename(3) for file_path to the script, so we do not get
weird double modules names in the logs;
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/trigger.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/cvs/trigger.c b/usr.bin/cvs/trigger.c
index b9b563c2187..24c09c10511 100644
--- a/usr.bin/cvs/trigger.c
+++ b/usr.bin/cvs/trigger.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trigger.c,v 1.5 2008/06/10 03:18:59 joris Exp $ */
+/* $OpenBSD: trigger.c,v 1.6 2008/06/10 03:33:21 joris Exp $ */
/*
* Copyright (c) 2008 Tobias Stoeckmann <tobias@openbsd.org>
* Copyright (c) 2008 Jonathan Armani <dbd@asystant.net>
@@ -105,8 +105,13 @@ expand_args(BUF *buf, struct file_info_list *file_info, const char *repo,
case 'l':
case 'S':
case 's':
- if (fi != NULL)
- val = fi->file_path;
+ if (fi != NULL) {
+ val = basename(fi->file_path);
+ if (val == NULL) {
+ fatal("basename: %s",
+ strerror(errno));
+ }
+ }
break;
case 't':
if (fi != NULL)