Changeset 18649 for gsdl/trunk


Ignore:
Timestamp:
2009-03-09T19:59:50+13:00 (15 years ago)
Author:
ak19
Message:

The subroutines file_exists and run_script (for exploding and src_replacing) need to first undo the base64 encoding on the given filenames to obtain the actual names of the files that are to be checked/processed. The base64 encoding of filenames was necessary to preserve any special characters in filenames when transferring these from GLI to the remote GS server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/cgi-bin/gliserver.pl

    r18395 r18649  
    77no strict 'subs';
    88no strict 'refs'; # allow filehandles to be variables and viceversa
    9 
    109
    1110# Set this to 1 to work around IIS 6 craziness
     
    447446    $gsdl_cgi->generate_error("No file specified.");
    448447    }
     448    $file = $gsdl_cgi->decode($file);
    449449    $file =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS
    450450
     
    627627    $gsdl_cgi->generate_error("No file specified.");
    628628    }
     629    $file = "\"$file\"";   # Windows: bookend the relative filepath with quotes in case it contains spaces
     630    $file = $gsdl_cgi->decode($file);
    629631    $file =~ s/\|/&util::get_dirsep()/eg;  # Convert the '|' characters into whatever is right for this OS
    630    
     632
    631633    # Not necessary: checking whether the user is authenticated to query existence of the file
    632634    #&authenticate_user($gsdl_cgi, $username, $collection);
     
    980982        $gsdl_cgi->generate_error("No file specified.");
    981983    }
    982     $gsdl_cgi->delete("file");
    983     #$file =~ s/ /\\ /g; # Works on linux: escape all spaces in filename with a backslash, i.e. "\ ".
     984    $gsdl_cgi->delete("file"); 
     985    $file = $gsdl_cgi->decode($file);
    984986    $file = "\"$file\""; # Windows: bookend the relative filepath with quotes in case it contains spaces
    985987    $perl_args = $file;
     
    11711173}
    11721174
    1173 
    11741175sub send_mail
    11751176{
Note: See TracChangeset for help on using the changeset viewer.