IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 25, 2010, 2:26:12 PM (16 years ago)
Author:
bills
Message:

Add force argument to $ipprc->file_delete() use it in magic_destreak_revert.pl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/magic_destreak_revert.pl

    r27015 r27092  
    253253    if ($mask) {
    254254        if (!revert_file($mask, $bmask)) {
    255             if ($stage eq 'chip') {
    256                 # don't fail if the mask file (from the camera stage) fails to revert.
    257                 # It probably doesn't exist
    258                 # XXX: Handle this properly
    259                 print STDERR "failure to revert mask file, ignored\n";
    260             } else {
    261                 &my_die("failed to restore mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR);
    262             }
     255            &my_die("failed to restore mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR);
    263256        }
    264257    }
     
    306299    my $original = shift;
    307300    my $backup   = shift;
     301    my $force = 1; # force deletion of backup files in nebulous
    308302
    309303    my $o_path = $ipprc->file_resolve($original);
     
    352346        }
    353347
    354         if ($b_path and -e $b_path) {
     348        if ($b_path) {
    355349            print "ready to delete backup\n" if $verbose;
    356             if (! $ipprc->file_delete($backup)) {
     350            if (! $ipprc->file_delete($backup, $force)) {
    357351                print "failed to delete $backup\n";
    358352                return 0;
     
    363357        print "original uri: $original is not a destreaked file no need to swap backup_result: $backup_result\n";
    364358        # delete the 'backup' (destreaked target) file if it exists
    365         if ($b_path and -e $b_path) {
    366             if (! $ipprc->file_delete($backup)) {
     359        if ($b_path) {
     360            if (! $ipprc->file_delete($backup, $force)) {
    367361                print "failed to delete $backup\n";
    368362                return 0;
Note: See TracChangeset for help on using the changeset viewer.