diff options
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/uudecode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/uudecode.c b/toys/posix/uudecode.c index 238e27e9..4d2861af 100644 --- a/toys/posix/uudecode.c +++ b/toys/posix/uudecode.c @@ -41,7 +41,8 @@ void uudecode_main(void) } } - ofd = xcreate(TT.o ? TT.o : line+idx, O_WRONLY|O_CREAT|O_TRUNC, + if (TT.o && !strcmp(TT.o, "-")) ofd = 1; + else ofd = xcreate(TT.o ? TT.o : line+idx, O_WRONLY|O_CREAT|O_TRUNC, string_to_mode(mode, 0777^toys.old_umask)); for(;;) { |