Age | Commit message (Collapse) | Author |
|
|
|
slash from one partition to another, and giving it a different
name at the destination would cause mv to get a failed assertion.
Reported by Michael Stone.
(strip_trailing_slashes_2): Move function definition to precede new first use.
|
|
(cp_option_init): Initialize new members.
(usage): Reflect the fact that --force (-f) relates only to whether
mv prompts.
(main): Remove uses of old `force' option member.
|
|
|
|
|
|
|
|
|
|
corresponding argument in a `quote (...)' call.
|
|
|
|
--target-dir=DIR option, but no arguments.
Patch from Michael Stone. Reported by herbert@gondor.apana.org.au.
|
|
|
|
|
|
optional argument, the -b option accepts none.
(main): Use `backup type' in call to xget_version, not the
now-deprecated `--version-control'.
|
|
to `-1' for unsigned int n_files == 0. Doing so lead to a segfault on
alpha. From Michael Stone.
|
|
|
|
|
|
|
|
|
|
|
|
Deprecate --version-control (-V) in comments.
(usage): Remove mention of --version-control.
(main): Make -V warn then fall through into --backup case.
[--backup case]: Handle optional arg.
|
|
|
|
|
|
|
|
(usage): Describe it.
(main): Implement it.
Remove unused variable, stdin_tty.
Make code clearer: use new variable `n_files' in place of
`argc - optind'. Use `file' instead of `argv + optind'.
|
|
Don't assume the traditional Unix values for mode bits.
|
|
|
|
via sys2.h.
|
|
Include version-etc.h instead.
(PROGRAM_NAME, AUTHORS): Define.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.
|
|
[long_options]: Remove the "help" and "version" entries.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.
|
|
|
|
(main): Don't call getenv ("VERSION_CONTROL"); xget_version does it.
Use xget_version and function-style XARGMATCH.
|
|
|
|
Bob McCracken reported that mv couldn't handle certain combinations
of hard linked source files.
|
|
|
|
With prodding from François Pinard :-)
|
|
Reported by Kaveh Ghazi.
|
|
copy.c (copy), now that copy() has better support for mv. This fixes
a bug with cross-filesystem `mv -i' whereby you could get two prompts
for the same destination file and eventually remove the destination
file even though one of the responses was negative.
Reported by Dirk Lattermann.
|
|
|
|
|
|
|
|
Use #if !, not #ifndef with HAVE_ macros.
|
|
Don't remove source directory when copy_into_self is nonzero.
Reported by Arne Henrik Juul.
|
|
Otherwise, mv tries to open special files.
Reported by Kjetil Torgrim Homme.
|
|
(cp_option_init): New function.
(copy_reg): Remove now-unused function.
(do_move): Set up for and use `copy.c (copy)' in place of copy_reg.
Set up for and use `remove.c (rm)' in place of unlink.
|
|
Include "closeout.h".
|
|
errno == EXDEV), then revert to trying copy-then-unlink. This is
necessary to allow moving files within certain types of Linux NFS
mounted filesystems. Reported by Marty Leisner.
|
|
|
|
(copy_reg): Use apply_attributes instead of open-coding the pieces.
Now, failure to preserve file attributes does not cause mv to change
its exit status, and such failures elicit warning diagnostics. This
behavior is required by POSIX. Before, failure to preserve ownership
due to insufficient access was diagnosed only for root.
Prompted by a report from Bengt Martensson.
|
|
(do_move): Update caller.
(movefile): Take new boolean parameter, DEST_IS_DIR,
to save a stat per moved file when the destination is a directory.
(main): Call movefile with additional argument.
(strip_trailing_slashes_2): New function.
(movefile): Remove trailing slashes from dest. Otherwise, stat ("b/")
fails with ENOTDIR on systems including Linux w/libc 2.0.30.
Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'.
(do_move): Fix misleading comment.
|
|
|