mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
mv: Improve message when moving two or more files to non-directory.
The message text is from cp, which has had a nicer message for this since 2007 (PR bin/50656). As with cp, the exit status changes from 64 to 1. PR: 201083 MFC after: 1 week
This commit is contained in:
parent
38b622e199
commit
7bb3697b4e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284916
@ -122,7 +122,7 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
if (stat(argv[argc - 1], &sb) || !S_ISDIR(sb.st_mode)) {
|
||||
if (argc > 2)
|
||||
usage();
|
||||
errx(1, "%s is not a directory", argv[argc - 1]);
|
||||
exit(do_move(argv[0], argv[1]));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user