| Summary: | kget downloading files from dynamic php pages get wrong names for files | ||
|---|---|---|---|
| Product: | [Applications] kget | Reporter: | Sebastian Turzański <dpbasti> | 
| Component: | general | Assignee: | KGet bugs <kget-bugs-null> | 
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | chok | 
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| 
        
          Description
        
        
          Sebastian Turzański
        
        
        
        
          2006-09-22 09:22:19 UTC
        
       Does anyone have a different URL where this happens? The above one doesn't seem to trigger a download for me. OK, it does work if you press the download button on the page you get (a measure to prevent direct downloads from other sites). SVN commit 588225 by pfeiffer:
Show the right filename for dynamic download things
BUG: 134489
 M  +6 -6      main.cpp  
--- branches/KDE/3.5/kdenetwork/kget/main.cpp #588224:588225
@@ -168,19 +168,19 @@
         else if(args->count()>=2)
 		{
 			KURL::List urls;
-			QString dest;
 			for( int i=0; i < args->count(); ++i){
 				urls.append(KURL::fromPathOrURL( args->arg(i)));
 			}
 			
-			// Sometimes valid filenames are not recognised by KURL::isLocalFile(), they are marked as unvalid then
-			if ( args->count()==2 & ( urls.last().isLocalFile() | !urls.last().isValid()))
+			// Sometimes valid filenames are not recognised by KURL::isLocalFile(), they are marked as invalid then
+			if ( args->count()==2 && ( urls.last().isLocalFile() || !urls.last().isValid()))
 			{
-				dest=urls.last().path();
-				kmain->addTransferEx( urls.first(), dest );
+				kmain->addTransferEx( urls.first(), urls.last() );
 			}
 			else
-				kmain->addTransfers( urls, dest );
+			{
+				kmain->addTransfers( urls, QString() );
+			}
 		}
         args->clear();
 
I have the same problems when calling kget through opera or command line, the filename is not right if the link is dynamic. Kget correctly resolves name if called by Konqueror though Kget version 2.1.1 from kdemod (kdemod-core/kdemod-kdenetwork-kget 4.1.2-1) |