Package: ktorrent
Version: 4.3.1-2
Severity: normal
Tags: upstream patch
Hi,
Please see attached patch this fixes the bug described at:
https://bugs.kde.org/show_bug.cgi?id=315239
.. This bug prevents the block lists in KTorrent from updating correctly.
Kitty
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (750, 'testing'), (700, 'testing'), (650, 'stable'), (600,
'stable'), (450, 'oldstable'), (400, 'oldstable'), (300, 'unstable'), (200,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ktorrent depends on:
ii kde-runtime 4:4.14.1-1+b1
ii ktorrent-data 4.3.1-2
ii libc6 2.19-12
ii libgcc1 1:4.9.1-16
ii libgeoip1 1.6.2-1
ii libkcmutils4 4:4.14.1-1+b1
ii libkdecore5 4:4.14.1-1+b1
ii libkdeui5 4:4.14.1-1+b1
ii libkdewebkit5 4:4.14.1-1+b1
ii libkdnssd4 4:4.14.1-1+b1
ii libkio5 4:4.14.1-1+b1
ii libknotifyconfig4 4:4.14.1-1+b1
ii libkparts4 4:4.14.1-1+b1
ii libkrosscore4 4:4.14.1-1+b1
ii libktorrent-l10n 1.3.1-3
ii libktorrent5 1.3.1-3+b1
ii libkworkspace4abi2 4:4.11.12-2+b1
ii libnepomuk4 4:4.14.1-1+b1
ii libnepomukutils4 4:4.14.1-1+b1
ii libphonon4 4:4.8.0-3
ii libqt4-dbus 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqt4-network 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqt4-qt3support 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqt4-script 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqt4-sql 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqt4-svg 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqt4-xml 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqtcore4 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqtgui4 4:4.8.6+git64-g5dc8b2b+dfsg-2+b1
ii libqtwebkit4 2.3.4.dfsg-3
ii libsolid4 4:4.14.1-1+b1
ii libsoprano4 2.9.4+dfsg-1.1
ii libstdc++6 4.9.1-16
ii libsyndication4 4:4.14.1-1
ii libtag1c2a 1.9.1-2.1
ii phonon 4:4.8.0-3
ktorrent recommends no packages.
Versions of packages ktorrent suggests:
ii krosspython 4:4.13.1-1
pn plasma-widget-ktorrent <none>
-- no debconf information
--- a/plugins/ipfilter/downloadandconvertjob.cpp 2013-01-15 04:12:24.000000000 +1100
+++ b/plugins/ipfilter/downloadandconvertjob.cpp 2014-10-25 02:22:58.300536134 +1100
@@ -94,7 +94,7 @@
active_job = 0;
if (j->error())
{
- Out(SYS_IPF|LOG_NOTICE) << "IP filter update failed: " << j->errorString() << endl;
+ Out(SYS_IPF | LOG_NOTICE) << "IP filter update failed: " << j->errorString() << endl;
if (mode == Verbose)
{
((KIO::Job*)j)->ui()->showErrorMessage();
@@ -104,31 +104,54 @@
QString msg = i18n("Automatic update of IP filter failed: %1", j->errorString());
notification(msg);
}
-
- setError(DOWNLOAD_FAILED);
+
+ setError(DOWNLOAD_FAILED);
emitResult();
return;
}
-
+
QString temp = kt::DataDir() + "tmp-" + url.fileName();
-
+
//now determine if it's ZIP or TXT file
- KMimeType::Ptr ptr = KMimeType::findByPath(temp);
- if (ptr->name() == "application/zip")
+ KMimeType::Ptr ptr = KMimeType::findByFileContent(temp);
+ Out(SYS_IPF|LOG_NOTICE) << "Mimetype: " << ptr->name() << endl;
+ if(ptr->name() == "application/zip")
+ {
+ active_job = KIO::file_move(temp, QString(kt::DataDir() + QLatin1String("level1.zip")), -1, KIO::HideProgressInfo | KIO::Overwrite);
+ connect(active_job, SIGNAL(result(KJob*)), this, SLOT(extract(KJob*)));
+ }
+ else if(ptr->name() == "application/x-7z-compressed")
{
- active_job = KIO::file_move(temp,QString(kt::DataDir() + QLatin1String("level1.zip")),-1,KIO::HideProgressInfo|KIO::Overwrite);
- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(extract(KJob*)));
+ QString msg = i18n("7z files are not supported", url.prettyUrl());
+ if (mode == Verbose)
+ KMessageBox::error(0, msg);
+ else
+ notification(msg);
+
+ setError(UNZIP_FAILED);
+ emitResult();
}
- else if (ptr->name() == "application/x-gzip" || ptr->name() == "application/x-bzip")
+ else if(ptr->name() == "application/gzip" || ptr->name() == "application/x-bzip")
{
- active_job = new bt::DecompressFileJob(temp,QString(kt::DataDir() + "level1.txt"));
- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*)));
+ active_job = new bt::DecompressFileJob(temp, QString(kt::DataDir() + "level1.txt"));
+ connect(active_job, SIGNAL(result(KJob*)), this, SLOT(convert(KJob*)));
active_job->start();
}
+ else if(!KMimeType::isBinaryData(temp) || ptr->name() == "text/plain")
+ {
+ active_job = KIO::file_move(temp, QString(kt::DataDir() + "level1.txt"), -1, KIO::HideProgressInfo | KIO::Overwrite);
+ connect(active_job, SIGNAL(result(KJob*)), this, SLOT(convert(KJob*)));
+ }
else
{
- active_job = KIO::file_move(temp,QString(kt::DataDir() + "level1.txt"),-1, KIO::HideProgressInfo|KIO::Overwrite);
- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*)));
+ QString msg = i18n("Cannot determine file type of <b>%1</b>", url.prettyUrl());
+ if (mode == Verbose)
+ KMessageBox::error(0, msg);
+ else
+ notification(msg);
+
+ setError(UNZIP_FAILED);
+ emitResult();
}
}
_______________________________________________
pkg-kde-extras mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras