ref: refs/heads/master
commit ddc67040e66373f96f9a5395707868cc6219726d
Author: Duncan Mac-Vicar P
Date: Thu Oct 15 17:27:39 2009 +0200
aria2 sends the url in the progress if there is no response from the server, handle that
to avoid flooding the log.
---
zypp/media/MediaAria2c.cc | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
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::liststd::string & retlist,
const Pathname & dirname, bool dots ) const
{
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org