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.
This commit is contained in:
Matt Kraai 2000-08-06 15:36:50 +00:00
parent deb95f69b6
commit adbf018dc4

View File

@ -229,7 +229,7 @@ extern int cp_mv_main(int argc, char **argv)
goto exit_false; goto exit_false;
destDirFlag = isDirectory(baseDestName, TRUE, &destStatBuf); destDirFlag = isDirectory(baseDestName, TRUE, &destStatBuf);
if ((argc > 3) && destDirFlag == FALSE) { if (argc - optind > 2 && destDirFlag == FALSE) {
errorMsg(not_a_directory, baseDestName); errorMsg(not_a_directory, baseDestName);
goto exit_false; goto exit_false;
} }