X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/9218fb0859abdc5a09758bed809b26902ae179d6..8bd9a0d82f7e21d9340a4470258e2cad2638deca:/selfforum-cgi/shared/Posting/Cache.pm diff --git a/selfforum-cgi/shared/Posting/Cache.pm b/selfforum-cgi/shared/Posting/Cache.pm index cf8c3c4..b765a49 100644 --- a/selfforum-cgi/shared/Posting/Cache.pm +++ b/selfforum-cgi/shared/Posting/Cache.pm @@ -25,7 +25,7 @@ use Lock qw(:ALL); # $VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; -my $O_BINARY = eval "O_BINARY"; +my $O_BINARY = eval 'local $SIG{__DIE__}; O_BINARY'; $O_BINARY = 0 if ($@); ### sub new #################################################################### @@ -416,10 +416,9 @@ sub r_add_posting { local $\; unless (-d $self -> threaddir($param)) { - mkdir $self->threaddir($param) or return; + mkdir $self->threaddir($param), 0777 or return; } - sysopen ( - FILE, + sysopen (FILE, $self->cachefile($param), O_WRONLY | O_CREAT | O_TRUNC ) or return; @@ -530,7 +529,7 @@ sub vote_wrap { } else { unless (-d $self->threaddir($param)) { - mkdir $self->threaddir($param) or return; + mkdir $self->threaddir($param), 0777 or return; } my $filename = $self->cachefile($param);