diff options
author | Jim Meyering <jim@meyering.net> | 2004-06-28 18:39:28 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-06-28 18:39:28 +0000 |
commit | 6860c032dac6a807a908125edd1dc2f95549ca5a (patch) | |
tree | 9951953e1d5b34f15b21ff517a1992785b76fe6e /man/mkfifo.x | |
parent | 59c3b539268fd48dd5fd9d63eacfd19534cc4146 (diff) | |
download | coreutils-6860c032dac6a807a908125edd1dc2f95549ca5a.tar.xz |
Use more-consistent rules among cp, ln, and mv when dealing with
last operands that are (or look like) directories.
* src/cp.c (target_directory_operand): New, nearly-common function,
It reports an error if the destination appears to be a directory
(e.g., because it has a trailing slash) but is not.
* src/ln.c, src/mv.c: Likewise.
* src/cp.c (do_copy): Use it.
* src/ln.c (main): Likewise.
* src/mv.c (main): Likewise.
* src/cp.c (do_copy): Don't output a usage message because of file
problems (e.g., an operand is not a directory). Use it only for
syntax. Standardize on "target %s is not a directory" for the
diagnostic.
* src/ln.c (main): Likewise.
* src/mv.c (main): Likewise.
* src/cp.c (do_copy): Remove test for trailing slash, since
target_directory_operand now does this.
* src/ln.c (main): Likewise.
* src/mv.c (movefile): Likewise.
* src/ln.c (isdir): Remove decl; no longer needed.
* src/mv.c (isdir, lstat): Likewise.
* src/ln.c (main): Use int to count to argc, not unsigned int.
This handles negative operand counts.
* src/mv.c (main): Likewise.
* src/mv.c (do_move): Don't call hash_init; expect the caller to
do it, for consistency with cp.c and ln.c. All callers changed.
(movefile): dest_is_dir parameter is now bool, not int.
(main): Standardize on "missing destination file operand after %s"
for the diagnostic, for consistency with cp.c.
Diffstat (limited to 'man/mkfifo.x')
0 files changed, 0 insertions, 0 deletions