From adbf018dc469d808fc0ca77f91bf37a871219d97 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Sun, 6 Aug 2000 15:36:50 +0000 Subject: [PATCH] We complained if the total number of arguments was greater than 3 and the destination wasn't a directory. We should only complain if the there are multiple sources and target isn't a directory. --- cp_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cp_mv.c b/cp_mv.c index 4c3c7a32c..5e1a8415e 100644 --- a/cp_mv.c +++ b/cp_mv.c @@ -229,7 +229,7 @@ extern int cp_mv_main(int argc, char **argv) goto exit_false; destDirFlag = isDirectory(baseDestName, TRUE, &destStatBuf); - if ((argc > 3) && destDirFlag == FALSE) { + if (argc - optind > 2 && destDirFlag == FALSE) { errorMsg(not_a_directory, baseDestName); goto exit_false; } -- 2.25.1