diff --git a/lib/WebGUI/Asset/File.pm b/lib/WebGUI/Asset/File.pm index 6d223bf53..dc087e234 100644 --- a/lib/WebGUI/Asset/File.pm +++ b/lib/WebGUI/Asset/File.pm @@ -628,7 +628,7 @@ sub update { $self->SUPER::update(@_); ##update may have entered a new storageId. Reset the cached one just in case. if ($self->get("storageId") ne $before{storageId}) { - $self->setStorageLocation; + delete $self->{_storageLocation}; } if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) { $self->setPrivileges; diff --git a/t/Asset/Asset.t b/t/Asset/Asset.t index 62203e141..9fc631575 100644 --- a/t/Asset/Asset.t +++ b/t/Asset/Asset.t @@ -1017,6 +1017,7 @@ use HTML::Packer; my $asset = WebGUI::Asset->getImportNode( $session )->addChild({ className => 'WebGUI::Asset::Snippet', }); +addToCleanup( $asset ); my $unpacked = qq{