diff options
author | Jim Meyering <jim@meyering.net> | 2006-03-26 12:07:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-03-26 12:07:34 +0000 |
commit | 00f103b6d1580042aac603c99647758f1da108ce (patch) | |
tree | dcc3edb0e885f440acd29bc33afac8c5aca04f07 /src | |
parent | 811ecf92848d654ee4cceff311853cd122a0ccec (diff) | |
download | coreutils-00f103b6d1580042aac603c99647758f1da108ce.tar.xz |
(target_directory_operand, movefile): Use new last_component, in place of base_name.
Diffstat (limited to 'src')
-rw-r--r-- | src/mv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -148,7 +148,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; @@ -266,7 +266,7 @@ movefile (char *source, char *dest, bool dest_is_dir, if (dest_is_dir) { /* Treat DEST as a directory; build the full filename. */ - char const *src_basename = base_name (source); + char const *src_basename = last_component (source); char *new_dest = file_name_concat (dest, src_basename, NULL); strip_trailing_slashes (new_dest); ok = do_move (source, new_dest, x); |