]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed bug in remove_ucsc_tracks
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 9 Dec 2008 04:05:58 +0000 (04:05 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 9 Dec 2008 04:05:58 +0000 (04:05 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@344 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index b0067b5f01baf2b54824ec8a8f88fd22e277fa32..41199b3d36b396a2c2146414c32624ada9386541 100644 (file)
@@ -4922,10 +4922,10 @@ sub script_remove_ucsc_tracks
 
     foreach $track ( @tracks )
     {
-        if ( not exists $track_hash{ $track->{ 'track' } } ) {
-            push @new_tracks, $track;
-        } else {
+        if ( $track->{ 'database' } eq $options->{ 'database' } and exists $track_hash{ $track->{ 'track' } } ) {
             print STDERR qq(Removing track "$track->{ 'track' }" from config file.\n) if $options->{ 'verbose' };
+        } else {
+            push @new_tracks, $track;
         }
     }
 
@@ -6679,6 +6679,8 @@ sub clean_tmp
             $sid  = $2;
             $pid  = $3;
 
+            next if $user eq "m.hansen";
+
             if ( $user eq Maasha::Common::get_user() )
             {
                 if ( not Maasha::Common::process_running( $pid ) )
@@ -6689,7 +6691,7 @@ sub clean_tmp
                 elsif ( $pid == $curr_pid )
                 {
                     # print STDERR "Removing current dir: $dir\n";
-                    Maasha::Common::dir_remove( $dir );
+                    Maasha::Common::dir_remove( $dir );
                 }
             }
         }