Changeset 27517


Ignore:
Timestamp:
2013-05-30T14:53:20+12:00 (11 years ago)
Author:
jmt12
Message:

Noticed and replaced a couple of -e's (that should have been -d's anyway) with FileUtils::directoryExists()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/GreenstoneXMLPlugout.pm

    r27516 r27517  
    6868    $outhandler = STDOUT;
    6969    # can we do the xslt and still do debug mode?
    70     } 
     70    }
    7171    else {
    7272    my $output_dir = $self->get_output_dir();
    73     &FileUtils::makeAllDirectories($output_dir) unless -e $output_dir;
    74    
    75     my $working_dir = &FileUtils::filenameConcatenate($output_dir, $doc_dir);   
    76     &FileUtils::makeAllDirectories($working_dir) unless -e $working_dir;
    77    
     73        if (!&FileUtils::directoryExists($output_dir))
     74        {
     75          &FileUtils::makeAllDirectories($output_dir);
     76        }
     77
     78    my $working_dir = &FileUtils::filenameConcatenate($output_dir, $doc_dir);
     79        if (!&FileUtils::directoryExists($working_dir))
     80        {
     81          &FileUtils::makeAllDirectories($working_dir);
     82        }
     83
    7884    $self->process_assoc_files ($doc_obj, $doc_dir, '');
    79    
     85
    8086    $self->process_metafiles_metadata ($doc_obj);
    8187
    8288    my $output_file = &FileUtils::filenameConcatenate($working_dir, "doc.xml");
    83    
     89
    8490    $self->open_xslt_pipe($output_file, $self->{'xslt_file'});
    85    
    86    
     91
    8792    if (defined $self->{'xslt_writer'}){
    8893        $outhandler = $self->{'xslt_writer'};
     
    9297    }
    9398    }
    94    
     99
    95100    binmode($outhandler,":utf8");
    96101
Note: See TracChangeset for help on using the changeset viewer.