diff options
author | Jim Meyering <jim@meyering.net> | 2006-03-26 12:06:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-03-26 12:06:45 +0000 |
commit | 9c3afb4a64da15ccbd24ad76bb29469428eb37d2 (patch) | |
tree | 8080fb8ee7e6f90680de9ba753f6e9fa8bb504f0 /src | |
parent | a1935760e5a1e2dad803256730c438b04ce50404 (diff) | |
download | coreutils-9c3afb4a64da15ccbd24ad76bb29469428eb37d2.tar.xz |
(target_directory_operand, install_file_in_dir): Use new last_component, in place of base_name.
Diffstat (limited to 'src')
-rw-r--r-- | src/install.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c index a5ada1479..2f4e66ef4 100644 --- a/src/install.c +++ b/src/install.c @@ -167,7 +167,7 @@ cp_option_init (struct cp_options *x) static bool target_directory_operand (char const *file) { - char const *b = base_name (file); + char const *b = last_component (file); size_t blen = strlen (b); bool looks_like_a_dir = (blen == 0 || ISSLASH (b[blen - 1])); struct stat st; @@ -463,7 +463,7 @@ static bool install_file_in_dir (const char *from, const char *to_dir, const struct cp_options *x) { - const char *from_base = base_name (from); + const char *from_base = last_component (from); char *to = file_name_concat (to_dir, from_base, NULL); bool ret = install_file_in_file (from, to, x); free (to); |