Commit 03a5d439 authored by Nils Goroll's avatar Nils Goroll

correct test for S_IFDIR

parent fc7b5ff6
......@@ -711,7 +711,7 @@ removeat(int fd, const char *p) {
return -1;
return real(unlinkat)(fd, p,
(tstat.st_mode & S_IFDIR) ? AT_REMOVEDIR : 0);
((tstat.st_mode & S_IFMT) == S_IFDIR) ? AT_REMOVEDIR : 0);
}
int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment