Fixed a bug where privileges were not being set correctly on cache files

and that was causing write errors.
 - fix [ 1281437 ] hidden children appear when changing assetsToHide
This commit is contained in:
JT Smith 2005-09-11 14:37:34 +00:00
parent 68d5986c39
commit 560318df51
4 changed files with 8 additions and 5 deletions

View file

@ -230,12 +230,11 @@ sub set {
my $self = shift;
my $content = shift;
my $ttl = shift || 60;
my $oldumask = umask();
umask(0000);
my $path = $self->getFolder();
unless (-e $path) {
my $oldumask = umask();
umask(0000);
eval {mkpath($path,0)};
umask($oldumask);
if ($@) {
WebGUI::ErrorHandler::error("Couldn't create cache folder: ".$path." : ".$@);
return;
@ -251,6 +250,7 @@ sub set {
open(FILE,">".$path."/expires");
print FILE time()+$ttl;
close(FILE);
umask($oldumask);
}