From 9cde1990ab1bfe04cf0ce84c54ccc29c5a0e1c55 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 10 Sep 1996 03:09:31 +0000 Subject: [PATCH] (do_copy): Describe in a little *more* detail the code that makes `cp non-directory file/' (eventually) fail. --- src/cp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cp.c b/src/cp.c index d61ed58031..977b7ace47 100644 --- a/src/cp.c +++ b/src/cp.c @@ -522,7 +522,8 @@ do_copy (int argc, char **argv) source exists but is not a directory, convert the user's command `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. */ + fail rather than performing the copy. COPY diagnoses the case of + `cp directory non-directory'. */ else if (dest[strlen (dest) - 1] == '/' && lstat (source, &source_stats) == 0 -- 2.47.2