Commit 816ff55a authored by Leo Gordon's avatar Leo Gordon
Browse files

change suggested by Matthieu to avoid crashing if the temp_directory has...

change suggested by Matthieu to avoid crashing if the temp_directory has already been deleted by Runnable
parent 78b7de4e
......@@ -557,7 +557,7 @@ sub cleanup_worker_temp_directory {
# TODO: simplify $holding_object=$self when -compile_module_once becomes the only option:
my $holding_object = $self->worker ? $self->worker : $self;
if($holding_object->{'_tmp_dir'}) {
if($holding_object->{'_tmp_dir'} and (-e $holding_object->{'_tmp_dir'}) ) {
my $cmd = "rm -r ". $holding_object->{'_tmp_dir'};
system($cmd);
}
......
......@@ -456,7 +456,7 @@ sub toString {
sub cleanup_worker_process_temp_directory {
my $self = shift;
if($self->{'_tmp_dir'}) {
if($self->{'_tmp_dir'} and (-e $self->{'_tmp_dir'}) ) {
my $cmd = "rm -r ". $self->{'_tmp_dir'};
system($cmd);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment