Changeset 10252 for trunk/gsdl
- Timestamp:
- 2005-07-19T10:50:57+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/upload
r10226 r10252 41 41 $dir = "" if (($dir eq ".") || ($dir =~ m/^\.\./)); 42 42 43 my $zip_content = $gsdl_cgi->clean_param("zip"); 44 my $zip_fname = "$col.zip"; 45 46 if ($col =~ m/^\//) { 43 if ($col =~ m/^\//) { 47 44 # leading / at start denotes special "cols" such as "/tmp" 48 45 $gsdl_cgi->checked_chdir("$gsdlhome"); … … 74 71 } 75 72 76 if (open(ZOUT,"> $zip_fname")) { 73 my $zip_file_name = $col . ".zip"; 74 my $zip_file_path = &util::filename_cat($full_col_dir, $zip_file_name); 75 if (open(ZOUT, ">$zip_file_path")) { 77 76 binmode(ZOUT); 78 77 … … 96 95 "SignedGatherer.jar"); 97 96 98 my $java_cmd = "$java -classpath \"$classpath\" org.greenstone.gatherer.util.Unzip \"$gsdlhome\" \"$zip_fname\""; 97 my $java_cmd = "$java -classpath \"$classpath\" org.greenstone.gatherer.util.Unzip \"$zip_file_path\" \"$full_col_dir\""; 98 $gsdl_cgi->generate_ok_message("Command: $java_cmd\n"); 99 99 100 100 my $java_output = `$java_cmd`; 101 101 102 102 my $status = $?; 103 unlink "$zip_f name";103 unlink "$zip_file_path"; 104 104 105 if ($status >0) {105 if ($status > 0) { 106 106 $status = $status/256; 107 107 my $exit_status = "Exit status: $status\n"; … … 113 113 } 114 114 else { 115 $gsdl_cgi->generate_error("unable to open $zip_f name");115 $gsdl_cgi->generate_error("unable to open $zip_file_path"); 116 116 } 117 117 }
Note:
See TracChangeset
for help on using the changeset viewer.