Skip to content

Commit ea6453f

Browse files
committed
Applying patch from http://bugs.movabletype.org/?82495 for feedback on inability to create asset cache path
1 parent 308be27 commit ea6453f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

lib/MT/Asset.pm

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,23 @@ sub _make_cache_path {
440440
if (!-d $real_cache_path) {
441441
require MT::FileMgr;
442442
my $fmgr = $blog ? $blog->file_mgr : MT::FileMgr->new('Local');
443-
$fmgr->mkpath($real_cache_path) or return undef;
443+
# The change below is related to
444+
# http://bugs.movabletype.org/?82495
445+
unless ($fmgr->mkpath($real_cache_path)) {
446+
my $app = MT->instance;
447+
$app->log(
448+
{
449+
message => $app->translate(
450+
"Could not create asset cache path: [_1]",
451+
$fmgr->errstr
452+
),
453+
level => MT::Log::ERROR(),
454+
class => 'asset',
455+
category => 'cache',
456+
}
457+
);
458+
return undef;
459+
}
444460
}
445461

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

0 commit comments

Comments
 (0)