Age | Commit message (Collapse) | Author |
|
(parents_option): Renamed from flag_path. All uses changed.
(make_dir_parents_private): Renamed from make_path_private.
All uses changed.
(usage): Don't use "path" to describe a file name.
|
|
Use chown_failure_ok rather than our own code.
(cp_options_init): Use chown_privileges rather than getuid.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
re_protect, make_path_private, target_directory_operand, do_copy,
cp_option_init, decode_preserve_arg, main): Use bool when appropriate.
(target_directory_operand): Do not clear *NEW_DST if stat
succeeds. It's not necessary in that case, as *NEW_DST is always
false already.
(do_copy): Rewrite slightly to avoid need for "unreachable" comment.
(main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1.
|
|
bother to check for this.
|
|
(make_path_private): 2nd arg is now size_t, not int,
to avoid problem when path_concat dir name is longer than 2 GiB (!).
|
|
and --no-target-directory options, respectively.
(NO_TARGET_DIRECTORY_OPTION, TARGET_DIRECTORY_OPTION):
Remove. All uses changed to 'T' and 't', respectively.
(long_opts, usage, do_copy, main): Add -t and -T as
aliases for --target-directory and --no-target-directory,
respectively.
|
|
(NO_TARGET_DIRECTORY_OPTION): New constant.
(long_opts, usage, do_copy, 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/cp.c (do_copy): Use it.
* src/cp.c (do_copy): Don't assume argc is positive.
Don't bother to lstat dest, since copy() will do that for us.
Use "const" to avoid the need for cast.
* 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/cp.c (do_copy): Remove test for trailing slash, since
target_directory_operand now does this.
* 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.
|
|
--target-directory: s/move/copy/. From Paul Jarc.
|
|
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.
(do_copy): Likewise.
|
|
Suggestion from Karl Berry.
Include "quoatearg.h".
(do_copy): Use quotearg_colon (not quote) for diagnostics
that begin with `"%s:'.
|
|
(do_copy): Declare/use local xstat rather than x->xstat.
(main): Remove code that set x.xstat.
|
|
(exit_status): Remove static var....
(main): Making it local here instead. Use =, not |=, to set it.
|
|
(make_path_private): Likewise.
|
|
The former is more maintainable and usually shorter.
|
|
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.
|
|
|
|
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.
|
|
(re_protect): Set file timestamps with utimens, not utime.
|
|
adequate, since join.c uses alloca, yet lacked an in-file #pragma.
Remove `#pragma alloca'.
|
|
to nonexistent destination directory. Reported by Dmitry Rutsky.
See http://bugs.debian.org/199730 for details.
|
|
|
|
|
|
xrealloc, and xcalloc return values and of xrealloc's first argument.
|
|
|
|
This reverts the two changes of 2003-02-21.
|
|
(main): Invoke `run' through a macro that (when possible) runs it
with a large, mmap'd stack.
|
|
RUN_WITH_BIG_STACK_*
|
|
from mv: s/missing file arguments/missing file argument/.
With --target-directory=DIR, cp and mv work with a single file argument.
Reported by Karl Berry.
|
|
--preserve=mode,ownership.
(decode_preserve_arg): Advance `comma' to
point the character following the comma.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
|
|
`failed to preserve ...' to make the failure clearer.
|
|
|
|
(long_opts): Add --copy-contents.
(usage): Describe new behavior. Sort options.
(main): Implement new behavior. Remove diagnostics for -a and -r;
no longer needed.
|
|
|
|
cp -r once again preserves symlinks.
(usage): Document the original (now-restored) behavior.
|
|
|
|
|