]> git.donarmstrong.com Git - biopieces.git/commitdiff
corrected bug in clean tmp to deal with permision problem
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 25 Jul 2008 03:06:16 +0000 (03:06 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 25 Jul 2008 03:06:16 +0000 (03:06 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@194 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index 80d1c18ae1dd2c216de777f62976211897fe45d1..43fd96e2a12ba30821b6f25e8e821e2d367b3475 100644 (file)
@@ -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 );
+                }
             }
         }
     }