Ignore:
Timestamp:
2019-02-16T19:36:06+13:00 (5 years ago)
Author:
ak19
Message:
  1. Bugfix to wget downloading: call to quotewords() necessarily has 2nd parameter keep set to to false/0, in order to remove quotes from cmd args, but which also has the undesirable side-effect of removing single backslashes (while double backslashes get turned to single backslashes). This caused a bug in the download tutorial failing as the cache dir on windows, which contained backslashes going in, ended up containing no backslashes at all when wget was run. The correct place to fix it is before quotewords() gets called in WgetDownload's 2 UseWget() methods. Before quotewords() is called, singlebackslashes are now protected as double backslashes, so that quotewords with 2nd param keep=0 now gets things back to normal by turning double backslashes to single again. 2. Minor change to MediaWikiDownload to reuse variable.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/downloaders/MediaWikiDownload.pm

    r28250 r32779  
    114114    # Setup the command for using wget
    115115    $wget_options = "-N -k -x -t 2 -P \"". $hashGeneralOptions->{"cache_dir"}."\" $strWgetOptions $strOptions ";
    116     my $cmdWget = "-N -k -x -t 2 -P \"". $hashGeneralOptions->{"cache_dir"}."\" $strWgetOptions $strOptions " . $self->{'url'};
     116    my $cmdWget   = $wget_options . $self->{'url'};
    117117   
    118118    # Download the web pages
Note: See TracChangeset for help on using the changeset viewer.