use S_ISDIR

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25230 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-05-25 23:45:03 +00:00
parent 1e5a14f8bd
commit 1db1289c87

View File

@@ -1741,7 +1741,7 @@ do_delete(char *name)
perror_reply(550, name);
return;
}
if ((st.st_mode&S_IFMT) == S_IFDIR) {
if (S_ISDIR(st.st_mode)) {
if (rmdir(name) < 0) {
perror_reply(550, name);
return;