Age | Commit message (Collapse) | Author |
|
corresponding argument in a `quote (...)' call -- if there's only one.
If there are more than one, then use `quote_n (0, ...),
quote_n (1, ...), ...'.
|
|
invoking savedir, and assume that errno is nonzero if savedir fails.
|
|
failed copy_dir call -- otherwise, the failure to read a single file
in a source directory would cause the containing destination directory
not to have owner/perms set properly. Reported by Piotr Kwapulinski.
|
|
|
|
(copy_internal): Change the || to ^ in the big sameness
test, so copying one symlink onto another, identical one doesn't fail here.
If the symlink call fails, don't report the failure if the destination
already exists and is a symlink pointing to the proper name.
|
|
|
|
a non-directory. Reported by Brian Kimball via Michael Stone.
|
|
(copy_internal): When making backup files in verbose
mode, print the backup file name on the same line as the rest of the
information, e.g., `a -> b (backup: b.~13~)' rather than on a line
by itself.
|
|
(copy_internal): In move mode, if the rename attempt
fails, then unlink any existing destination file. This makes a
cross-device `mv' more consistent with the intra-device behavior.
This change is required by POSIX to make a cross-device move act with
semantics similar to those of the rename syscall. For example now
`mv' can move a file onto a symlink to itself when that symlink
is on a separate partition. With fileutils-4.0j, it would fail with
a diagnostic saying they were the same file.
Reported by Bruno Haible.
|
|
and *do* allow `mv' to move a file onto a symlink to itself when that
symlink is on a separate partition. With fileutils-4.0j, it would
fail with a diagnostic saying they were the same file.
Reported by Bruno Haible.
|
|
`mv src symlink-to-src' when src and dest are on different partitions.
Otherwise, that `mv' command would silently remove `src'.
Reported by Michael Stone.
|
|
|
|
|
|
Otherwise, `mv' would not preserve the permissions when copying
between partitions. Reported by David Godfrey
|
|
Add a single condition to the existing sameness test.
|
|
(copy_internal): Qualify SAME_INODE test with (link-count == 1
|| same_name(...)).
|
|
Based on a patch from Chris Yeo.
|
|
it follows the `if (new_dst || !S_ISDIR (dst_sb.st_mode))' block.
Prior to this change, `cp --one-file-system' would traverse a file-
system boundary if the destination directory existed.
From thospel@mail.dma.be.
|
|
That is, even though source and destination are `the same,' don't fail
if the destination is a symlink. From Peter Samuelson.
|
|
Don't assume the traditional Unix values for mode bits.
|
|
|
|
operations when in verbose mode.
(copy_internal): Likewise.
Based on changes from Marty Leisner.
|
|
failed rename of a directory into a subdirectory of itself.
|
|
from format string. From Michiel Bacchiani.
|
|
|
|
test for move/copy-into-self.
Instead, deduce the move-into-self condition from errno==EINVAL
after a failed rename.
|
|
Otherwise, `touch a b; echo n|mv -i a b' would remove b.
From Bernd Leibing.
|
|
to avoid damaging the destination filesystem when copying from a
Netapp snapshot directory. With code from Kjetil Torgrim Hollstein
and Paul Eggert.
|
|
directories (but none of their entries). This makes
`cp --one-file-system' work the same way tar does.
From Marty Leisner.
|
|
|
|
|
|
sameness test: when --force has been specified, the destination
is unlinked before any copy.
(copy_internal): Add yet another: when both src and dest are symlinks.
|
|
to make the code a little clearer.
|
|
Use it to replace open-coded equivalents.
|
|
symbolic link in the current directory.
From Andreas Schwab.
|
|
from symlink over a non-symlink while making backups.
|
|
|
|
big if-(backup_type == none) block.
|
|
(copy_internal): Make the test symmetric.
|
|
|
|
Add parameter.
(copy): Add parameter.
|
|
Use more-specific preserve_* members in place of removed `preserve'.
(copy_internal): Honor failed_unlink_is_fatal.
|
|
|
|
Use #if !, not #ifndef with HAVE_ macros.
|
|
(copy_internal): Likewise.
(copy): Likewise.
Update all callers.
|
|
not only to lack of permission (EPERM), but also to lack of support
(EINVAL). Reported by Bengt Martensson.
|
|
(valid_options): Use VALID_BACKUP_TYPE and VALID_SPARSE_MODE.
|
|
|
|
|
|
Do not assume st_size has been normalized to 512 byte blocks,
or that it fits in size_t after dividing by the blocksize.
|