From: martinahansen Date: Fri, 25 Jul 2008 03:06:16 +0000 (+0000) Subject: corrected bug in clean tmp to deal with permision problem X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=08fa929cdb87efc073fd2cdf74bf31d3d29d8109;p=biopieces.git 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 --- 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 ); + } } } }