aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/ktorrent
diff options
context:
space:
mode:
authorMarkus Brueffer <markus@FreeBSD.org>2007-10-31 00:21:44 +0000
committerMarkus Brueffer <markus@FreeBSD.org>2007-10-31 00:21:44 +0000
commit42696a0192983686fee819439098591b297ffa2b (patch)
treecc3050d9a09af2ca5d887b8459db493de132e5e9 /net-p2p/ktorrent
parent3f80fae9c66cece63fb2a6e11a0fbca8677e131e (diff)
downloadports-42696a0192983686fee819439098591b297ffa2b.tar.gz
ports-42696a0192983686fee819439098591b297ffa2b.zip
Notes
Diffstat (limited to 'net-p2p/ktorrent')
-rw-r--r--net-p2p/ktorrent/Makefile1
-rw-r--r--net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp34
2 files changed, 35 insertions, 0 deletions
diff --git a/net-p2p/ktorrent/Makefile b/net-p2p/ktorrent/Makefile
index ddc47b98c4ef..303c21615968 100644
--- a/net-p2p/ktorrent/Makefile
+++ b/net-p2p/ktorrent/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ktorrent
PORTVERSION= 2.2.2
+PORTREVISION= 1
CATEGORIES= net-p2p kde
MASTER_SITES= http://ktorrent.org/downloads/${PORTVERSION}/ \
http://www.brueffer.de/distfiles/
diff --git a/net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp b/net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp
new file mode 100644
index 000000000000..f57f053e75c9
--- /dev/null
+++ b/net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp
@@ -0,0 +1,34 @@
+--- apps/ktorrent/fileselectdlg.cpp 2007/10/07 11:30:13 722461
++++ apps/ktorrent/fileselectdlg.cpp 2007/10/07 11:32:52 722462
+@@ -94,11 +94,20 @@
+ void FileSelectDlg::accept()
+ {
+ QStringList pe_ex;
++
++ QString dn = m_downloadLocation->url();
++ if (!dn.endsWith(bt::DirSeparator()))
++ dn += bt::DirSeparator();
+
+ for (Uint32 i = 0;i < tc->getNumFiles();i++)
+ {
+ kt::TorrentFileInterface & file = tc->getTorrentFile(i);
+
++ // check for preexsting files
++ QString path = dn + tc->getStats().torrent_name + bt::DirSeparator() + file.getPath();
++ if (bt::Exists(path))
++ file.setPreExisting(true);
++
+ if (file.doNotDownload() && file.isPreExistingFile())
+ {
+ // we have excluded a preexsting file
+@@ -136,10 +145,7 @@
+ }
+
+ //Setup custom download location
+- QString dn = m_downloadLocation->url();
+ QString ddir = tc->getDataDir();
+- if (!dn.endsWith(bt::DirSeparator()))
+- dn += bt::DirSeparator();
+ if (!ddir.endsWith(bt::DirSeparator()))
+ ddir += bt::DirSeparator();
+