Changeset 27092
- Timestamp:
- Feb 25, 2010, 2:26:12 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (1 diff)
-
ippScripts/scripts/magic_destreak_revert.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r26516 r27092 655 655 my $self = shift; # Configuration object 656 656 my $name = shift; # File name to check 657 my $force = shift; # pass force flag to the delete method 657 658 my $status; 658 659 659 660 my $scheme = file_scheme($name); # The scheme, e.g., file://, path:// 660 661 if (defined $scheme and lc($scheme) eq 'neb') { 661 $status = eval { $self->nebulous->delete( $name ); };662 $status = eval { $self->nebulous->delete( $name, $force ); }; 662 663 ( carp "Unable to delete Nebulous handle $name" and return undef ) if $@; 663 664 } else { -
trunk/ippScripts/scripts/magic_destreak_revert.pl
r27015 r27092 253 253 if ($mask) { 254 254 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); 263 256 } 264 257 } … … 306 299 my $original = shift; 307 300 my $backup = shift; 301 my $force = 1; # force deletion of backup files in nebulous 308 302 309 303 my $o_path = $ipprc->file_resolve($original); … … 352 346 } 353 347 354 if ($b_path and -e $b_path) {348 if ($b_path) { 355 349 print "ready to delete backup\n" if $verbose; 356 if (! $ipprc->file_delete($backup )) {350 if (! $ipprc->file_delete($backup, $force)) { 357 351 print "failed to delete $backup\n"; 358 352 return 0; … … 363 357 print "original uri: $original is not a destreaked file no need to swap backup_result: $backup_result\n"; 364 358 # 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)) { 367 361 print "failed to delete $backup\n"; 368 362 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
