Bug 268449

Summary: KGet overwrites a metalink with itself
Product: [Applications] kget Reporter: Christopher Yeleighton <giecrilj>
Component: metalinkAssignee: KGet authors <kget>
Status: RESOLVED FIXED    
Severity: normal CC: mat69
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christopher Yeleighton 2011-03-14 11:42:09 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

During normal operation, KGet downloads metalinks from the Web to a local directory, interprets them and deletes them.  However, if it is asked to open a metalink from the default download directory, it still offers to download the metalink file; as a result, it replaces the metalink file with itself, removes it and fails to interpret it.

Reproducible: Always

Steps to Reproduce:
  1. Use Firefox to download a metalink [1].
  2. Tell Firefox to open the downloaded metalink.
  3. Agree to the default action.

Actual Results:  
  2. KGet offers to download the metalink to itself.
  3. KGet removes the metalink.

Expected Results:  
  2. Since the metalink is already on the local file system, KGet should download the referenced resource openSUSE-11.4-NET-i586.iso instead of trying to download the metalink file itself.

OS: Linux (x86_64) release 2.6.37.1-1.2-desktop
Compiler: gcc

Workaround: 
  * tell KGet to download the metalink somewhere else 
  * or use a different directory for Firefox downloads and KGet downloads.
___
[1] <URL: http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-NET-i586.iso.meta4 >
Comment 1 Matthias Fuchs 2011-03-14 16:02:32 UTC
Hmm somehow I can't reproduce it. I mean I also get dialog 2 but if I press ok the iso is downloaded.
Not sure if I changed something in 4.6.1 -- that is what I used -- which would fix your problem.

Is the metalink plugin activated?
Comment 2 Christopher Yeleighton 2011-03-15 09:52:31 UTC
I suppose the metalink plug-in is activated, otherwise my workaround would not help.
Did you place the metalink exactly at the path where KGet wants to download it?
Comment 3 Matthias Fuchs 2011-03-15 22:46:21 UTC
Ok, was a mistake on my part. I'll see if I can fix this.
Comment 4 Matthias Fuchs 2011-03-23 21:46:20 UTC
SVN commit 1225838 by mfuchs:

Downloading the contents of a metalink file or a torrent file to the same directory the metalink is in works now.
BUG:268449

 M  +3 -4      core/urlchecker.cpp  
 M  +6 -3      core/urlchecker.h  
 M  +12 -4     ui/newtransferdialog.cpp  
 M  +1 -0      ui/newtransferdialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225838
Comment 5 Matthias Fuchs 2011-03-23 21:57:35 UTC
SVN commit 1225841 by mfuchs:

Backport r1225838
Downloading the contents of a metalink file or a torrent file to the same directory the metalink is in works now.
CCBUG:268449

 M  +3 -4      core/urlchecker.cpp  
 M  +6 -3      core/urlchecker.h  
 M  +12 -4     ui/newtransferdialog.cpp  
 M  +1 -0      ui/newtransferdialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225841