Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
name: Garbage Cleaner
id: GarbageCleaner
version: 0.1
MT::FileInfo::post_remove: >
sub {
my ( $cb, $obj ) = @_;
my $path = $obj->file_path;
require MT::FileMgr;
my $fmgr = MT::FileMgr->new( 'Local' )
or die MT::FileMgr->errstr;
if ( $fmgr->exists( $path ) ) {
$fmgr->delete( $path ) or die MT::FileMgr->errstr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.