From 08fa929cdb87efc073fd2cdf74bf31d3d29d8109 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Fri, 25 Jul 2008 03:06:16 +0000 Subject: [PATCH] corrected bug in clean tmp to deal with permision problem git-svn-id: http://biopieces.googlecode.com/svn/trunk@194 74ccb610-7750-0410-82ae-013aeee3265d --- code_perl/Maasha/Biopieces.pm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/code_perl/Maasha/Biopieces.pm b/code_perl/Maasha/Biopieces.pm index 80d1c18..43fd96e 100644 --- a/code_perl/Maasha/Biopieces.pm +++ b/code_perl/Maasha/Biopieces.pm @@ -6087,15 +6087,18 @@ sub clean_tmp $sid = $2; $pid = $3; - if ( not Maasha::Common::process_running( $pid ) ) + if ( $user eq Maasha::Common::get_user() ) { - # print STDERR "Removing stale dir: $dir\n"; - Maasha::Common::dir_remove( $dir ); - } - elsif ( $pid == $curr_pid ) - { - # print STDERR "Removing current dir: $dir\n"; - Maasha::Common::dir_remove( $dir ); + if ( not Maasha::Common::process_running( $pid ) ) + { + # print STDERR "Removing stale dir: $dir\n"; + Maasha::Common::dir_remove( $dir ); + } + elsif ( $pid == $curr_pid ) + { + # print STDERR "Removing current dir: $dir\n"; + Maasha::Common::dir_remove( $dir ); + } } } } -- 2.39.5