From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 30 03:20:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4B9816A474 for ; Tue, 30 Oct 2007 03:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 93CB113C4AC for ; Tue, 30 Oct 2007 03:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9U3K1bk046298 for ; Tue, 30 Oct 2007 03:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9U3K1m6046297; Tue, 30 Oct 2007 03:20:01 GMT (envelope-from gnats) Resent-Date: Tue, 30 Oct 2007 03:20:01 GMT Resent-Message-Id: <200710300320.l9U3K1m6046297@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Shane Bell Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9677A16A46C for ; Tue, 30 Oct 2007 03:18:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 8721913C4B0 for ; Tue, 30 Oct 2007 03:18:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9U3I8UP016181 for ; Tue, 30 Oct 2007 03:18:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9U3I8MB016180; Tue, 30 Oct 2007 03:18:08 GMT (envelope-from nobody) Message-Id: <200710300318.l9U3I8MB016180@www.freebsd.org> Date: Tue, 30 Oct 2007 03:18:08 GMT From: Shane Bell To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/117654: [PATCH]: net-p2p/ktorrent. fix for bug which results in data loss. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 03:20:01 -0000 >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: