Changeset 31823


Ignore:
Timestamp:
2017-07-26T20:00:53+12:00 (7 years ago)
Author:
ak19
Message:

Another bugfix to GLI's downloadjob display: on Linux, the number of files already downloaded weren't being displayed, whereas this worked on Windows. Wget seems to use backtick or single quote character to bookend names of files already downloaded. We used to only process the backtick before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/download/DownloadJob.java

    r31820 r31823  
    11101110            // If line contains "/s) - `" set currently
    11111111            // downloading url to "Download Complete".
    1112             else if(line.lastIndexOf("/s) - `") != -1) {
    1113                 String current_file_downloading = line.substring(line.indexOf("`") + 1, line.lastIndexOf("'"));
     1112            // Currently: on windows ` marks start quote of downloaded file, but on linux ' marks it
     1113            else if(line.lastIndexOf("/s) - `") != -1 || line.lastIndexOf("/s) - '") != -1) {
     1114                String startChar = (line.lastIndexOf("/s) - `") != -1) ? "`" : "'";
     1115                String current_file_downloading = line.substring(line.indexOf(startChar) + 1, line.lastIndexOf("'"));
    11141116                if(!ignore_for_robots) {
    11151117                DebugStream.println("Not ignore for robots");
Note: See TracChangeset for help on using the changeset viewer.