diff options
author | 2008-06-10 03:33:21 +0000 | |
---|---|---|
committer | 2008-06-10 03:33:21 +0000 | |
commit | 25f202cdfe7510595eb0f0ee721a127e2ee966df (patch) | |
tree | 6f7dbdc28e51df43542eda10659a6a499fc8b1fa | |
parent | add missing arg to .Fn (diff) | |
download | wireguard-openbsd-25f202cdfe7510595eb0f0ee721a127e2ee966df.tar.xz wireguard-openbsd-25f202cdfe7510595eb0f0ee721a127e2ee966df.zip |
pass the basename(3) for file_path to the script, so we do not get
weird double modules names in the logs;
-rw-r--r-- | usr.bin/cvs/trigger.c | 11 |
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) |