diff options
author | Jim Meyering <jim@meyering.net> | 1996-09-10 03:05:15 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-09-10 03:05:15 +0000 |
commit | 3fc07d456b155a8c8171c33db0d3bd1c1f63beb3 (patch) | |
tree | 31a0ee5f1af3f902bab9dfb040f18bb33fcbcb47 | |
parent | 73ca4590853ca3a506d8fae80b42eb3f4d8121e2 (diff) | |
download | coreutils-3fc07d456b155a8c8171c33db0d3bd1c1f63beb3.tar.xz |
(do_copy): Describe in a little more detail the code
that makes `cp non-directory file/' (eventually) fail.
-rw-r--r-- | src/cp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -520,7 +520,9 @@ do_copy (int argc, char **argv) /* When the destination is specified with a trailing slash and the source exists but is not a directory, convert the user's command - `cp source dest/' to `cp source dest/basename(source)'. */ + `cp source dest/' to `cp source dest/basename(source)'. Doing + this ensures that the command `cp non-directory file/' will now + fail rather than performing the copy. */ else if (dest[strlen (dest) - 1] == '/' && lstat (source, &source_stats) == 0 |