Date: Tue, 30 Oct 2007 03:18:08 GMT From: Shane Bell <decept0@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/117654: [PATCH]: net-p2p/ktorrent. fix for bug which results in data loss. Message-ID: <200710300318.l9U3I8MB016180@www.freebsd.org> Resent-Message-ID: <200710300320.l9U3K1m6046297@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 117654 >Category: ports >Synopsis: [PATCH]: net-p2p/ktorrent. fix for bug which results in data loss. >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Oct 30 03:20:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Shane Bell >Release: >Organization: >Environment: >Description: This patch fixes an annoying bug which results in downloaded data being accidentally deleted, details of the bug at the link below. http://bugs.kde.org/show_bug.cgi?id=150563 >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN /usr/ports/net-p2p/ktorrent/Makefile ktorrent/Makefile --- /usr/ports/net-p2p/ktorrent/Makefile 2007-10-24 00:02:06.000000000 +1300 +++ ktorrent/Makefile 2007-10-30 15:06:31.000000000 +1300 @@ -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 -ruN /usr/ports/net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp --- /usr/ports/net-p2p/ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp 1970-01-01 12:00:00.000000000 +1200 +++ ktorrent/files/patch-apps-ktorrent-fileselectdlg.cpp 2007-10-17 21:37:29.000000000 +1300 @@ -0,0 +1,34 @@ +--- apps/ktorrent/fileselectdlg.cpp.orig 2007-10-17 21:34:50.000000000 +1300 ++++ apps/ktorrent/fileselectdlg.cpp 2007-10-17 21:36:14.000000000 +1300 +@@ -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(); + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710300318.l9U3I8MB016180>