Skip to content

Commit

Permalink
Try harder to make the save_to directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Mar 3, 2020
1 parent 3ab53dd commit e325a6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for FCGI-Buffer

0.16
Try harder to mkdir the save_to directory

0.15 Fri 3 Jan 17:05:38 EST 2020
IO::Compress:Brotli hasn't been ported to Windows
Added sanity checking to the save_to->directory parameter
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FCGI-Buffer Version 0.14
FCGI-Buffer Version 0.15

INSTALLATION

Expand Down
7 changes: 5 additions & 2 deletions lib/FCGI/Buffer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,11 @@ sub init {
if(defined($params{save_to}) && $self->can_cache()) {
if(my $dir = $params{'save_to'}->{'directory'}) {
if(! -d $dir) {
Carp::carp("$dir isn't a directory");
return;
mkdir $save_to->{directory};
if(! -d $dir) {
Carp::carp("$dir isn't a directory");
return;
}
}
if(! -w $dir) {
Carp::carp("$dir isn't writeable");
Expand Down

0 comments on commit e325a6f

Please sign in to comment.