diff options
author | Jim Meyering <jim@meyering.net> | 2002-03-02 17:16:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-03-02 17:16:42 +0000 |
commit | e2497bb4fd2f534b3dde89c2c8e6d4df4d5e1291 (patch) | |
tree | 51a45385dcf94900552ef5b24b852d32fbaeae57 /src | |
parent | 7a5c83d8d53223c7b0e494175ee5e44b2ed555c3 (diff) | |
download | coreutils-e2497bb4fd2f534b3dde89c2c8e6d4df4d5e1291.tar.xz |
(copy_internal): For each symlink copied by cp -r,
issue a warning that `cp -r' is not portable.
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/copy.c b/src/copy.c index 4da2b2190..eb369b243 100644 --- a/src/copy.c +++ b/src/copy.c @@ -1406,6 +1406,12 @@ copy_internal (const char *src_path, const char *dst_path, goto un_backup; } + if (x->recursive && x->copy_as_regular) + { + error (0, 0, _("%s: WARNING: using -r to copy symbolic\ + links is not portable"), quote (src_path)); + } + if (!symlink (src_link_val, dst_path)) free (src_link_val); else |