summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4e3cca)
raw | patch | inline | side by side (parent: c4e3cca)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 17 Apr 2005 16:55:36 +0000 (09:55 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 17 Apr 2005 16:55:36 +0000 (09:55 -0700) |
Use the proper octal mode naming instead of random decimal
crud, and don't reset the mode after the create with fchmod:
the whole point was to let "umask" do its thing.
Duh.
crud, and don't reset the mode after the create with fchmod:
the whole point was to let "umask" do its thing.
Duh.
checkout-cache.c | patch | blob | history |
diff --git a/checkout-cache.c b/checkout-cache.c
index 09b36b9c77e5ed3b833f7ede502640a966373f49..b909f5d9a0ec10c99b850bf794cb7a4191cd0740 100644 (file)
--- a/checkout-cache.c
+++ b/checkout-cache.c
{
int fd;
- mode = (mode & 0100) ? 777 : 666;
+ mode = (mode & 0100) ? 0777 : 0666;
fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, mode);
if (fd < 0) {
if (errno == ENOENT) {
fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, mode);
}
}
- if (fd >= 0)
- fchmod(fd, mode);
return fd;
}