aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index 18daafbf..4e6a31e7 100644
--- a/main.c
+++ b/main.c
@@ -70,6 +70,7 @@ void toy_init(struct toy_list *which, char *argv[])
toys.argv = argv;
if (NEED_OPTIONS && which->options) get_optflags();
else toys.optargs = argv+1;
+ if (which->flags & TOYFLAG_UMASK) toys.old_umask = umask(0);
}
// Run a toy.