- Add patch to fix broken preexisting file check, which can result in files
being deleted when the user deselects them and they already exist (KDE BUG 150563). - Bump PORTREVISION PR: ports/117654 Submitted by: Shane Bell <decept0@gmail.com> Approved by: portmgr (erwin)
This commit is contained in:
parent
3f80fae9c6
commit
42696a0192
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=202447
4 changed files with 70 additions and 0 deletions
|
@ -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/
|
||||
|
|
34
net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp
Normal file
34
net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp
Normal file
|
@ -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();
|
||||
|
|
@ -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/
|
||||
|
|
|
@ -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();
|
||||
|
Loading…
Reference in a new issue