From: Duncan Mac-Vicar P Date: Thu, 15 Oct 2009 15:27:39 +0000 (+0200) Subject: aria2 sends the url in the progress if there is no response from the server, handle... X-Git-Tag: 6.18.2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddc67040e66373f96f9a5395707868cc6219726d;p=platform%2Fupstream%2Flibzypp.git aria2 sends the url in the progress if there is no response from the server, handle that to avoid flooding the log. --- diff --git a/zypp/media/MediaAria2c.cc b/zypp/media/MediaAria2c.cc index 7a6b150..39f9e20 100644 --- a/zypp/media/MediaAria2c.cc +++ b/zypp/media/MediaAria2c.cc @@ -358,11 +358,13 @@ void MediaAria2c::getFileCopy( const Pathname & filename , const Pathname & targ else if ( str::hasPrefix(line, "FILE: ") ) { // get the FILE name - Pathname theFile(line.substr(6, line.size())); + string theFile(line.substr(6, line.size())); // is the report about the filename we are downloading? // aria may report progress about metalinks, torrent and // other stuff which is not the main transfer - if ( theFile == target ) + // the reported file is the url before the server emits a response + // and then is reported as the target file + if ( Pathname(theFile) == target || theFile == fileurl.asCompleteString() ) { // once we find the FILE: line, progress has to be // non empty @@ -536,7 +538,6 @@ bool MediaAria2c::authenticate(const std::string & availAuthTypes, bool firstTry return false; } - void MediaAria2c::getDirInfo( std::list & retlist, const Pathname & dirname, bool dots ) const {