added test for directory
This commit is contained in:
parent
369cf7ea09
commit
2b521b56f9
@ -415,6 +415,10 @@ char *mess;
|
|||||||
error(FALSE, "cannot find %s\n", name);
|
error(FALSE, "cannot find %s\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (status.st_mode & S_IFDIR) {
|
||||||
|
error(FALSE, "%s is a directory (ignored)\n", name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if ((src_fd = open(name, 0)) < 0) {
|
else if ((src_fd = open(name, 0)) < 0) {
|
||||||
error(FALSE, "cannot open %s\n", name);
|
error(FALSE, "cannot open %s\n", name);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user