use S_ISDIR and S_ISREG
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25229 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -292,16 +292,10 @@ source(int argc, char **argv)
|
|||||||
syserr: run_err("%s: %s", name, strerror(errno));
|
syserr: run_err("%s: %s", name, strerror(errno));
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
switch (stb.st_mode & S_IFMT) {
|
if (S_ISDIR(stb.st_mode) && iamrecursive) {
|
||||||
case S_IFREG:
|
rsource(name, &stb);
|
||||||
break;
|
goto next;
|
||||||
case S_IFDIR:
|
} else if (!S_ISREG(stb.st_mode)) {
|
||||||
if (iamrecursive) {
|
|
||||||
rsource(name, &stb);
|
|
||||||
goto next;
|
|
||||||
}
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
default:
|
|
||||||
run_err("%s: not a regular file", name);
|
run_err("%s: not a regular file", name);
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user