mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
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:
parent
deb95f69b6
commit
adbf018dc4
2
cp_mv.c
2
cp_mv.c
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user