cp: Default to -P when -R is specified
POSIX only specifies the -H, -L, and -P options for use with -R, and the default is left to the implementation. Without -R, symlinks must be followed. Most implementations use -P as the default with -R, which makes sense to me as default behavior (the source and destination trees are the same). Since we use the same code for -R and without it, and we allow -H, -L, and -P without -R, set the default based on the presence of -R. Without it, use -L as before, as required by POSIX, and with it, use -P to match the behavior of other implementations.master
parent
61f5d4887a
commit
f4b9b966cf
Loading…
Reference in New Issue