IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32911


Ignore:
Timestamp:
Dec 9, 2011, 9:45:42 AM (15 years ago)
Author:
bills
Message:

When reverting be less paranoid. If the resolved basename of the original file
doesn't have SR_ go ahead and delete the backup regardless of whether it's basename
contains SR_ or not.
use $ipprc->redirect_to_logfile() to avoid dead instances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20111110/ippScripts/scripts/magic_destreak_revert.pl

    r32873 r32911  
    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)) {
Note: See TracChangeset for help on using the changeset viewer.