summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)