1 |
kensington 14/01/29 13:06:10 |
2 |
|
3 |
Added: ktorrent-4.3.1-ipfilter.patch |
4 |
Log: |
5 |
Backport patch from upstream fixing issue with IP filter lists, wrt bug #499602. |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x06B1F38DCA45A1EC!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ktorrent-4.3.1-ipfilter.patch |
16 |
=================================================================== |
17 |
From 3dfcbeb9765e99f9b99951134b17268eb7a617d2 Mon Sep 17 00:00:00 2001 |
18 |
From: Joris Guisson <joris.guisson@×××××.com> |
19 |
Date: Thu, 1 Aug 2013 13:19:29 +0200 |
20 |
Subject: [PATCH] Backport ipfilter extraction fixes from master branch to 4.3 |
21 |
branch |
22 |
|
23 |
BUG: 315239 |
24 |
--- |
25 |
ChangeLog | 3 +++ |
26 |
plugins/ipfilter/downloadandconvertjob.cpp | 22 +++++----------------- |
27 |
2 files changed, 8 insertions(+), 17 deletions(-) |
28 |
|
29 |
diff --git a/ChangeLog b/ChangeLog |
30 |
index c5ae9da..42c48ff 100644 |
31 |
--- a/ChangeLog |
32 |
+++ b/ChangeLog |
33 |
@@ -1,3 +1,6 @@ |
34 |
+Changes in 4.3.2: |
35 |
+- Backport ipfilter extraction fixes from master branch (315239) |
36 |
+ |
37 |
Changes in 4.3.1: |
38 |
- Fix new custom groups not appearing in add to group submenu (307230) |
39 |
- Fix crash when right clicking on some locations in the GroupView due to 0 pointer (307160) |
40 |
diff --git a/plugins/ipfilter/downloadandconvertjob.cpp b/plugins/ipfilter/downloadandconvertjob.cpp |
41 |
index d3092ac..4080c2a 100644 |
42 |
--- a/plugins/ipfilter/downloadandconvertjob.cpp |
43 |
+++ b/plugins/ipfilter/downloadandconvertjob.cpp |
44 |
@@ -114,12 +114,13 @@ namespace kt |
45 |
|
46 |
//now determine if it's ZIP or TXT file |
47 |
KMimeType::Ptr ptr = KMimeType::findByPath(temp); |
48 |
+ Out(SYS_IPF|LOG_NOTICE) << "Mimetype: " << ptr->name() << endl; |
49 |
if (ptr->name() == "application/zip") |
50 |
{ |
51 |
active_job = KIO::file_move(temp,QString(kt::DataDir() + QLatin1String("level1.zip")),-1,KIO::HideProgressInfo|KIO::Overwrite); |
52 |
connect(active_job,SIGNAL(result(KJob*)),this,SLOT(extract(KJob*))); |
53 |
} |
54 |
- else if (ptr->name() == "application/x-gzip" || ptr->name() == "application/x-bzip") |
55 |
+ else if (ptr->name() == "application/x-gzip" || ptr->name() == "application/x-bzip" || ptr->name() == "application/gzip") |
56 |
{ |
57 |
active_job = new bt::DecompressFileJob(temp,QString(kt::DataDir() + "level1.txt")); |
58 |
connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*))); |
59 |
@@ -174,23 +175,10 @@ namespace kt |
60 |
} |
61 |
|
62 |
QString destination = kt::DataDir() + "level1.txt"; |
63 |
- if (zip->directory()->entries().contains("splist.txt")) |
64 |
+ QStringList entries = zip->directory()->entries(); |
65 |
+ if (entries.count() >= 1) |
66 |
{ |
67 |
- active_job = new bt::ExtractFileJob(zip,"splist.txt",destination); |
68 |
- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*))); |
69 |
- unzip = true; |
70 |
- active_job->start(); |
71 |
- } |
72 |
- else if (zip->directory()->entries().contains("level1.txt")) |
73 |
- { |
74 |
- active_job = new bt::ExtractFileJob(zip,"level1.txt",destination); |
75 |
- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*))); |
76 |
- unzip = true; |
77 |
- active_job->start(); |
78 |
- } |
79 |
- else if (zip->directory()->entries().contains("ipfilter.dat")) |
80 |
- { |
81 |
- active_job = new bt::ExtractFileJob(zip,"ipfilter.dat",destination); |
82 |
+ active_job = new bt::ExtractFileJob(zip,entries.front(),destination); |
83 |
connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*))); |
84 |
unzip = true; |
85 |
active_job->start(); |
86 |
-- |
87 |
1.8.3.2 |