Changeset 8096


Ignore:
Timestamp:
2004-09-02T14:35:08+12:00 (20 years ago)
Author:
davidb
Message:

Special case code added for a collection name of "/tmp" (or any collection
name beginning with a slash). This is interpreted to mean the top level
gsdl folder, not within 'collect'.

Location:
trunk/gsdl/cgi-bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/cgi-bin/download

    r7957 r8096  
    1818    $dir = "" if ((!defined $dir) || ($dir eq "."));
    1919
    20 
    21     $gsdl_cgi->checked_chdir("$gsdlhome/collect");
     20    if ($col =~ m/^\//) {
     21    # leading / at start denotes special "cols" such as "/tmp"
     22    $gsdl_cgi->checked_chdir("$gsdlhome");
     23    $col =~ s/^\///;
     24    }
     25    else {
     26    $gsdl_cgi->checked_chdir("$gsdlhome/collect");
     27    }
    2228
    2329    # Change this to Java zip??
  • trunk/gsdl/cgi-bin/upload

    r7957 r8096  
    2525    my $zip_fname = "$col.zip";
    2626
    27     $gsdl_cgi->checked_chdir("$gsdlhome/collect/");
     27    if ($col =~ m/^\//) {
     28    # leading / at start denotes special "cols" such as "/tmp"
     29    $gsdl_cgi->checked_chdir("$gsdlhome");
     30    $col =~ s/^\///;
     31    }
     32    else {
     33    $gsdl_cgi->checked_chdir("$gsdlhome/collect");
     34    }
     35
    2836    my $col_dir = "$col/$dir"; # Unix specific
    2937    $gsdl_cgi->rm_rf($col_dir);
Note: See TracChangeset for help on using the changeset viewer.