summaryrefslogtreecommitdiff
path: root/src/posix.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2004-05-20 01:06:52 +0000
committerStef Walter <stef@thewalter.net>2004-05-20 01:06:52 +0000
commit77e90afb05ccde00fd59e152c3296f2994d60d6d (patch)
tree212b363d4c0460f6e32e86a68d8fe160a1f4b8f4 /src/posix.c
parent4297404391e6d828d71306f7402ba1cdd05297aa (diff)
Linux fixes
Diffstat (limited to 'src/posix.c')
-rw-r--r--src/posix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/posix.c b/src/posix.c
index 91bb43a..14a9a2d 100644
--- a/src/posix.c
+++ b/src/posix.c
@@ -94,7 +94,10 @@ void setFileAttributes(fchar_t* filename, uint32 flags)
}
else
{
- if(chmod(filename, st.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH)) == -1)
+ st.st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
+ fprintf(stderr, "mode: %x", st.st_mode);
+
+ if(chmod(filename, st.st_mode) == -1)
warn("couldn't set file attributes for: " FC_PRINTF, encoded);
}
}