From daf265138866eb2dd34218253ad2ad4c29b79b19 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Thu, 21 Aug 2008 20:52:30 +0000 Subject: [PATCH] protect against folders already being gone --- docs/upgrades/upgrade_7.5.20-7.5.21.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_7.5.20-7.5.21.pl b/docs/upgrades/upgrade_7.5.20-7.5.21.pl index b56808b28..f014e66a3 100644 --- a/docs/upgrades/upgrade_7.5.20-7.5.21.pl +++ b/docs/upgrades/upgrade_7.5.20-7.5.21.pl @@ -40,7 +40,7 @@ sub removeUnusedImportFolder { print "\tRemoving legacy folders from Import node if empty... " unless $quiet; for my $assetId (qw(lK9-YMfZ4mpc-Me-UydrFg j3P_Vvsy0OtvUJZRXC55Nw XP2W66c8vtDVpxN50Fiwww JJ-SZb9z2l_N46A0AWW7KA Cn2TOyQH3qqnQrWDrsGrxg sMuqO3Ynl6Lyn5fa2SsGmQ NYr6iP4pQaPRYqEYMryv4w)) { my $asset = WebGUI::Asset->new($session, $assetId); - if ($asset->getChildCount == 0) { + if ($asset && $asset->getChildCount == 0) { $asset->purge; } }