IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32810 for trunk/pstamp/scripts


Ignore:
Timestamp:
Nov 25, 2011, 8:52:24 AM (15 years ago)
Author:
bills
Message:

change date based part of working directories from YYYYMMDD/ to YY/MM/DD/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_parser_run.pl

    r30317 r32810  
    8989    # outdir is where all of the files generated for this request are placed
    9090    # NOTE: this location needs to be kept in sync with the web interface ( request.php )
    91     my $datestr = strftime "%Y%m%d", gmtime;
     91    my $datestr = strftime "%Y/%m/%d", gmtime;
    9292    my $datedir = "$pstamp_workdir/$datestr";
    9393    if (! -e $datedir ) {
    94         mkdir $datedir or my_die( "failed to create working directory $datedir for request id $req_id", $req_id,
    95             $PS_EXIT_CONFIG_ERROR);
     94        my $rc = system "mkdir -p $datedir";
     95        if ($rc) {
     96            my $status = $rc >> 8;
     97            $status = $PS_EXIT_CONFIG_ERROR if !$status;
     98            my_die( "failed to create working directory $datedir for request id $req_id", $req_id,
     99                $status);
     100        }
    96101    }
    97102
Note: See TracChangeset for help on using the changeset viewer.