Only delete files if no error

pull/2077/head
Isaac Connor 2018-01-16 14:01:26 -05:00
parent a8dde207e1
commit aaa6c5cccb
1 changed files with 3 additions and 1 deletions

View File

@ -483,7 +483,9 @@ sub MoveTo {
$$self{Storage} = $NewStorage;
$error .= $self->save();
}
$self->delete_files( $OldStorage );
if ( ! $error ) {
$self->delete_files( $OldStorage );
}
return $error;
} # end sub MoveTo