chmod: Clear the S_IFMT bits before calling chmod
This commit is contained in:
parent
4f1d0df755
commit
71ba97c175
2
chmod.c
2
chmod.c
|
@ -13,7 +13,7 @@ chmodr(const char *path, struct stat *st, void *data, struct recursor *r)
|
||||||
{
|
{
|
||||||
mode_t m;
|
mode_t m;
|
||||||
|
|
||||||
m = parsemode(modestr, st->st_mode, mask);
|
m = parsemode(modestr, st->st_mode & ~S_IFMT, mask);
|
||||||
if (chmod(path, m) < 0) {
|
if (chmod(path, m) < 0) {
|
||||||
weprintf("chmod %s:", path);
|
weprintf("chmod %s:", path);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user