Changeset 10874

Show
Ignore:
Timestamp:
09.11.2005 14:09:09 (14 years ago)
Author:
kjdon
Message:

upload now unzips everything in the collect directory - when the zip files are created, they contain eg collname/etc/collect.cfg

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gsdl-2_62-distribution-branch/gsdl/cgi-bin/upload

    r10584 r10874  
    2424    } 
    2525 
     26    my $collect_dir = &util::filename_cat($gsdlhome,"collect"); 
    2627    my $full_col = &util::filename_cat($gsdlhome,"collect",$col); 
    27  
    2828    #If the collection dir on the server somehow got erased, create it. 
    2929    if(!-e $full_col) { 
     
    3535    $gsdl_cgi->generate_error("No directory name specified"); 
    3636    } 
    37  
    3837    my $delete = $gsdl_cgi->clean_param("del"); 
    3938    $delete = "all" if((!defined $delete) || ($delete eq "")); 
     
    5251    my $col_dir = &util::filename_cat($col,$dir); 
    5352    my $full_col_dir = &util::filename_cat($full_col,$dir); 
    54  
    5553    if($delete eq "all") { 
    5654    $gsdl_cgi->local_rm_r($col_dir); 
     
    7270 
    7371    my $zip_file_name = $col . ".zip"; 
    74     my $zip_file_path = &util::filename_cat($full_col_dir, $zip_file_name); 
     72    #my $zip_file_path = &util::filename_cat($full_col_dir, $zip_file_name); 
     73    my $zip_file_path = &util::filename_cat($collect_dir, $zip_file_name); 
    7574    if (open(ZOUT, ">$zip_file_path")) { 
    7675    binmode(ZOUT); 
     
    9594                        "SignedGatherer.jar"); 
    9695 
    97     my $java_cmd = "$java -classpath \"$classpath\" org.greenstone.gatherer.util.Unzip \"$zip_file_path\" \"$full_col_dir\""; 
     96    #my $java_cmd = "$java -classpath \"$classpath\" org.greenstone.gatherer.util.Unzip \"$zip_file_path\" \"$full_col_dir\""; 
     97    my $java_cmd = "$java -classpath \"$classpath\" org.greenstone.gatherer.util.Unzip \"$zip_file_path\" \"$collect_dir\""; 
    9898    $gsdl_cgi->generate_ok_message("Command: $java_cmd\n"); 
    9999