From feaa668f73c2ceb6477df152becd63debd7d1edc Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Tue, 10 Jun 2008 03:33:22 +0000 Subject: pass the basename(3) for file_path to the script, so we do not get weird double modules names in the logs; --- usr.bin/cvs/trigger.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'usr.bin/cvs/trigger.c') 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 * Copyright (c) 2008 Jonathan Armani @@ -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) -- cgit v1.2.3