IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 19, 2013, 3:39:39 PM (13 years ago)
Author:
eugene
Message:

merged from trunk

Location:
branches/eam_branches/ipp-20130307/pstamp/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/pstamp/scripts

  • branches/eam_branches/ipp-20130307/pstamp/scripts/pstamp_cleanup.pl

    r34231 r35412  
    183183    }
    184184
    185     my $command = "rm -r $dir";
     185    # do an ls of the directory before starting
     186#    print "directory listing for $dir\n";
     187#    system "ls $dir";
     188
     189    my $command = "rm -rf $dir";
    186190    unless ($no_update) {
    187191        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    188192            run(command => $command, verbose => $verbose);
    189193        unless ($success) {
    190             my $rc = $error_code >> 8;
    191             my_die("Unable to perform $command return status: $rc", $req_id, $rc);
     194            if (-e $dir) {
     195                my $rc = $error_code >> 8;
     196                my_die("Unable to perform $command return status: $rc", $req_id, $rc);
     197            } else {
     198                print STDERR "rm claimed to fail but directory no longer exists\n";
     199            }
    192200        }
    193201    } else {
Note: See TracChangeset for help on using the changeset viewer.