Skip to content

Commit

Permalink
Use File::Path::remove_tree to save a system() call
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed May 11, 2018
1 parent a1c64e7 commit f6d6fdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/Bio/EnsEMBL/Hive/Process.pm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ package Bio::EnsEMBL::Hive::Process;
use strict;
use warnings;

use File::Path qw(remove_tree);
use JSON;
use Scalar::Util qw(looks_like_number);
use Time::HiRes qw(time);
Expand Down Expand Up @@ -696,7 +697,7 @@ sub cleanup_worker_temp_directory {

my $tmp_dir = $self->worker_temp_directory_name();
if(-e $tmp_dir) {
system('rm', '-r', $tmp_dir);
remove_tree($tmp_dir, {error => undef});
}
}

Expand Down

0 comments on commit f6d6fdd

Please sign in to comment.