summaryrefslogtreecommitdiff
path: root/lib/filenamecat.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-03-26 12:16:11 +0000
committerJim Meyering <jim@meyering.net>2006-03-26 12:16:11 +0000
commitcb916337dce4d713ab5946ab4825b3b159579455 (patch)
tree552f153e93de0ea23b57d0bbda62de3bbb4fe2e1 /lib/filenamecat.c
parentbfbe80d00470ba5a2e5958317a0ffdf1f8face50 (diff)
downloadcoreutils-cb916337dce4d713ab5946ab4825b3b159579455.tar.xz
(file_name_concat): s/base_name/last_component/
Diffstat (limited to 'lib/filenamecat.c')
-rw-r--r--lib/filenamecat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/filenamecat.c b/lib/filenamecat.c
index f94734630..399d7db31 100644
--- a/lib/filenamecat.c
+++ b/lib/filenamecat.c
@@ -1,7 +1,7 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
- Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -64,7 +64,7 @@ longest_relative_suffix (char const *f)
char *
file_name_concat (char const *dir, char const *abase, char **base_in_result)
{
- char const *dirbase = base_name (dir);
+ char const *dirbase = last_component (dir);
size_t dirbaselen = base_len (dirbase);
size_t dirlen = dirbase - dir + dirbaselen;
size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1]));