Changeset 26760


Ignore:
Timestamp:
2013-01-20T16:43:15+13:00 (9 years ago)
Author:
davidb
Message:

Checks for an export directory before trying to write to it. Then checks for an existing subdirectory within exports for writing Expeditee frames to. If neither of these exist, they will be created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/perllib/cgiactions/HtmlToExpediteeAction.pm

    r26752 r26760  
    115115    my $json_str_utf8 = Encode::encode("utf8",$json_str_unicode);
    116116    my $exp_frame_tree = decode_json $json_str_utf8;
     117
     118    #if (!-d $output_dir) {
     119    #&util::mk_dir($output_dir);
     120    #}
    117121   
    118     #output frameset to a subfolder within export directory.
     122    #Check for export directory. If it doesn't exist, create it.
     123    my $export_dir = &util::filename_cat($collect_dir,$collect,"export");
     124   
     125    if(!-d $export_dir){
     126        &util::mk_dir($export_dir);
     127    }
     128   
     129    #create output subdirectory within export directory.
    119130    my $output_dir = &util::filename_cat($collect_dir,$collect,"export",$collect);
    120     #my $output_dir = &util::filename_cat($collect_dir,$collect,"export");
    121 
    122     if (!-d $output_dir) {
    123     &util::mk_dir($output_dir);
    124     }
     131   
     132    if(!-d $output_dir){
     133        &util::mk_dir($output_dir);
     134    }
    125135
    126136    my $expeditee_frame_io = new ExpediteeFrameIO($output_dir);
Note: See TracChangeset for help on using the changeset viewer.