From ea6453f918676c1c45f1453a1e692aff6236f383 Mon Sep 17 00:00:00 2001 From: Jay Allen Date: Sun, 28 Dec 2008 17:47:33 -0800 Subject: [PATCH] Applying patch from http://bugs.movabletype.org/?82495 for feedback on inability to create asset cache path --- lib/MT/Asset.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/MT/Asset.pm b/lib/MT/Asset.pm index 7b2d3e746..2fa0bbd33 100644 --- a/lib/MT/Asset.pm +++ b/lib/MT/Asset.pm @@ -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),