IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:49:37 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/ippScripts/scripts/magic_destreak_revert.pl

    r32669 r33638  
    8686my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    8787
    88 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;
     88$ipprc->redirect_to_logfile($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;
    8989
    9090&my_die("bytes and md5sum are is required for raw stage stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) if ($replace and $stage eq 'raw' and (!$bytes or !$md5sum));
     
    421421            # files are in their original state. Just delete back up file
    422422            # otherwise go to failed_revert for manual inspection.
    423             if (!($o_basename =~ /SR_/) and ($b_basename =~ /SR_/)) {
     423            # XXX: We probably can get by with just checking the basename of the original file
     424            if (!($o_basename =~ /SR_/) ) {
     425            # if (!($o_basename =~ /SR_/) and ($b_basename =~ /SR_/)) {
    424426                print STDERR " basenames are as expected it is safe to delete backup file\n";
    425427                if (! $ipprc->file_delete($backup, $force)) {
     
    481483    foreach my $file (@_) {
    482484        next if !$file;
    483         if ($ipprc->file_exists($file)) {
    484             if (!$ipprc->file_delete($file)) {
    485                 &my_die("failed to delete recovery file $file", $magic_ds_id, $component, $PS_EXIT_UNKNOWN_ERROR);
    486             }
    487         }
     485        # don't care if this fails or not (it will fail if storage
     486        # object doesn't exist
     487        $ipprc->kill_file($file);
    488488    }
    489489}
Note: See TracChangeset for help on using the changeset viewer.