Age | Commit message (Collapse) | Author |
|
|
|
bug in Interix. Just call symlink or link directly. All uses changed.
|
|
|
|
(do_link): Don't use alloca on a buffer of unbounded size.
|
|
(FILE_BASENAME_CONCAT): Remove.
(do_link): Remove last arg DEST_IS_DIR. All callers changed.
(main): Use file_name_concat, base_name, and strip_trailing_slashes
instead of FILE_BASENAME_CONCAT. This simplifies the code, and avoids
the use of alloca.
|
|
boundary between DEST and SOURCE in the result.
|
|
encounters an existing destination file, and gets an affirmative
response, then first try to unlink the destination file rather
than simply failing. Suggestion from Karl Berry.
|
|
|
|
It was deprecated nearly 6 years ago and has been warning
users to switch to --backup=S since fileutils-4.0j.
|
|
All uses changed.
|
|
|
|
|
|
|
|
|
|
|
|
verbose, hard_dir_link, dereference_dest_dir_symlinks,
do_link, main): Use bool for booleans.
|
|
bother to check for this.
|
|
and --no-target-directory options, respectively.
(NO_TARGET_DIRECTORY_OPTION, TARGET_DIRECTORY_OPTION):
Remove. All uses changed to 'T' and 't', respectively.
(long_options, main, usage): Add -t and -T as
aliases for --target-directory and --no-target-directory,
respectively.
|
|
(NO_TARGET_DIRECTORY_OPTION): New constant.
(long_options, usage, main): Add support for
|
|
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/cp.c (main): Reject multiple target directories.
Check whether a specified target is a directory when parsing the
options, using stat. This gives more-accurate diagnostics.
* src/ln.c (main): Likewise.
* src/ln.c (isdir): Remove decl; no longer needed.
* src/mv.c (isdir, lstat): Likewise.
* src/ln.c (do_link): New arg dest_is_dir. All uses changed.
Don't check the destination ourself; rely on dest_is_dir.
This way we can avoid lstatting the destination in the
usual case, and in the worst case we lstat 1, not 3 times.
Don't bother to unlink unless link failed; this saves a syscall.
Remove unnecessary backup_succeeded flag;
it was identical to "dest_backup != NULL".
* src/ln.c (main): Use int to count to argc, not unsigned int.
This handles negative operand counts.
* src/mv.c (main): Likewise.
|
|
d/" incorrectly created a link d/x/x. It also saves some system
calls.
(main): Don't append basename to dest if this
results in an existing directory name.
|
|
(main): Avoid subscript error when the destination is "".
|
|
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
|
|
Instead, include yesno.h.
|
|
|
|
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
|
|
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
|
|
work even for superuser. Suggestion from Dan Jacobson.
|
|
|
|
(PATH_BASENAME_CONCAT): Use memcpy rather than strcpy.
(do_link): Likewise.
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
|
|
|
|
adequate, since join.c uses alloca, yet lacked an in-file #pragma.
Remove `#pragma alloca'.
|
|
(do_link): Don't warn about hard link to symlink.
|
|
|
|
|
|
|
|
Patch by Dmitry V. Levin.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
|
|
|
|
instead of hard-coding --help and --version descriptions.
|
|
for short options too.''
|
|
descriptions are alone in their own string.
|
|
Use fputs, not printf.
|
|
`and'.
|
|
Patch by Frederik Eaton.
|