Age | Commit message (Collapse) | Author |
|
Fail when checking (-c) with more than one file argument,
rather than simply ignoring the extra arguments.
|
|
(main): The -u option now just sets TZ; it doesn't do anything else.
(show_date): Do not do anything special if -u is set.
This affects the behavior of the -I and -R options.
|
|
broke "date -u MMDDhhmm" and it wasn't documented.
This reverts to the behavior of the 1996-01-03 patch.
(TZ_UTC0, MAYBE_SET_TZ_UTC0, set_tz): Remove.
(batch_convert): Don't futz with TZ.
(main): -u now parses all dates as UTC, not just some.
|
|
|
|
|
|
|
|
file mode permission bits are the same as those that should be set.
Omitting the chmod call would be alright with minimal 1003.1e DS17
ACLs, but eventually there will be other permissions in addition to
rwx. E.g., add and delete for directories, and something analogous
to NT's take ownership permission.
|
|
the previously-set umask unconditionally. Do that only when a
MODE has been specified. Otherwise, call mkfifo with the full
creation mask (0777 or 0666) and let the kernel apply the umask.
The difference shows up only on file systems with ACL support
when the containing directory has a default ACL.
Patch by Andreas Gruenbacher.
(main): Rename local `symbolic_mode' to `specified_mode'.
Also, when MODE is specified, call chmod to ensure that the
permission bits are set as specified even when the containing
directory has a default ACL.
|
|
|
|
the previously-set umask unconditionally. Do that only when a
MODE has been specified. Otherwise, call mknod with the full
creation mask (0777 or 0666) and let the kernel apply the umask.
The difference shows up only on file systems with ACL support
when the containing directory has a default ACL.
Patch by Andreas Gruenbacher.
(main): Rename local `symbolic_mode' to `specified_mode'.
Also, when MODE is specified, call chmod to ensure that the
permission bits are set as specified even when the containing
directory has a default ACL.
|
|
|
|
the previously-set umask unconditionally. Do that only when a
MODE has been specified. Otherwise, call mkdir with the full
creation mask (0777 or 0666) and let the kernel apply the umask.
The difference shows up only on file systems with ACL support
when the containing directory has a default ACL.
Patch by Andreas Gruenbacher.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--symbolic-link options now implies --remove-destination.
|
|
unlinks an existing destination before trying to open it for writing.
Otherwise, installing onto a running shared library would make the
running program malfunction.
|
|
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.
|
|
using --remove-dest with -R.
|
|
(also making it match the texinfo documentation).
|
|
preceding chown call and we're supposed to preserve some special
permission bit(s) that would have been reset by chown.
Reported by Greg Louis.
|
|
(copy_internal): Avoid calling chown if we know it's not necessary.
|
|
|
|
|
|
|
|
|
|
|
|
as well as the definition of lstat from cp.c to this file.
|
|
as well as the definition of lstat from here to copy.h.
|
|
|
|
|
|
|
|
checkpoint
|
|
|
|
(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.
|
|
[long_options]: Add an entry for --remove-destination.
(usage): Describe --remove-destination.
(do_copy): Use unlink_dest_after_failed_open member, not `force.'
(cp_option_init): Initialize new members.
(main): Handle UNLINK_DEST_BEFORE_OPENING (aka --remove-destination).
|
|
|
|
|
|
|
|
[unlink_dest_before_opening]: Add member.
[unlink_dest_after_failed_open]: Add member.
|
|
and partially rewritten.
(copy_internal): Unlink destination file when unlink_dest_before_opening
option is set, and when the source is neither a regular file nor a directory.
|
|
Remove the SPARSE_MODE parameter. Update caller.
Perform POSIX-mandated (for cp) open-with-O_WRONLY|O_TRUNC when
the regular destination file exists; upon failure, unlink
that existing file, then open again, but with O_WRONLY|O_CREAT.
(copy_internal): `force' in not related to interactive; remove
the conjunct.
Remove the entire `else if (x->force)' block; justifying
removal of the non-directory part is easy: POSIX requires we try
to open an existing regular file, so we can't unlink it beforehand.
The part that changes the mode on a directory to allow overwriting
isn't necessary.
|
|
since we then unlink the destination file.
|
|
|
|
|
|
(buggy_lseek_support): New function.
(skip): Use it.
Frank Adler reported that although _llseek returns 0, lseek
erroneously returns an offset suggesting the operation succeeded
even though it fails.
|
|
impossible and some buggy drivers return zero.
Use SEEK_CUR rather than SEEK_SET; this fixes a bug when the
file descriptor is not currently rewound.
|