Skip to content

Commit

Permalink
Applying patch from http://bugs.movabletype.org/?82495 for feedback o…
Browse files Browse the repository at this point in the history
…n inability to create asset cache path
  • Loading branch information
jayallen committed Mar 12, 2009
1 parent 308be27 commit ea6453f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/MT/Asset.pm
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,23 @@ sub _make_cache_path {
if (!-d $real_cache_path) {
require MT::FileMgr;
my $fmgr = $blog ? $blog->file_mgr : MT::FileMgr->new('Local');
$fmgr->mkpath($real_cache_path) or return undef;
# The change below is related to
# http://bugs.movabletype.org/?82495
unless ($fmgr->mkpath($real_cache_path)) {
my $app = MT->instance;
$app->log(
{
message => $app->translate(
"Could not create asset cache path: [_1]",
$fmgr->errstr
),
level => MT::Log::ERROR(),
class => 'asset',
category => 'cache',
}
);
return undef;
}
}

my $asset_cache_path = File::Spec->catdir(($pseudo ? $format : $root_path),
Expand Down

0 comments on commit ea6453f

Please sign in to comment.