diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-08-06 15:36:50 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-08-06 15:36:50 +0000 |
commit | 120af7916f17b3fd193a4fab67bb181c07352a4c (patch) | |
tree | 07ece14f5727bc9674d23be267b26f26d7330a6d /cp_mv.c | |
parent | 1b663ab3652143dd3124487f0ef096d4bf1a38d8 (diff) | |
download | busybox-w32-120af7916f17b3fd193a4fab67bb181c07352a4c.tar.gz busybox-w32-120af7916f17b3fd193a4fab67bb181c07352a4c.tar.bz2 busybox-w32-120af7916f17b3fd193a4fab67bb181c07352a4c.zip |
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.
git-svn-id: svn://busybox.net/trunk/busybox@944 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'cp_mv.c')
-rw-r--r-- | cp_mv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -229,7 +229,7 @@ extern int cp_mv_main(int argc, char **argv) | |||
229 | goto exit_false; | 229 | goto exit_false; |
230 | 230 | ||
231 | destDirFlag = isDirectory(baseDestName, TRUE, &destStatBuf); | 231 | destDirFlag = isDirectory(baseDestName, TRUE, &destStatBuf); |
232 | if ((argc > 3) && destDirFlag == FALSE) { | 232 | if (argc - optind > 2 && destDirFlag == FALSE) { |
233 | errorMsg(not_a_directory, baseDestName); | 233 | errorMsg(not_a_directory, baseDestName); |
234 | goto exit_false; | 234 | goto exit_false; |
235 | } | 235 | } |