From: Jim Meyering Date: Sat, 2 Mar 2002 17:16:42 +0000 (+0000) Subject: (copy_internal): For each symlink copied by cp -r, X-Git-Tag: FILEUTILS-4_1_6~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2497bb4fd2f534b3dde89c2c8e6d4df4d5e1291;p=thirdparty%2Fcoreutils.git (copy_internal): For each symlink copied by cp -r, issue a warning that `cp -r' is not portable. --- diff --git a/src/copy.c b/src/copy.c index 4da2b2190b..eb369b243e 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