[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/bittorr...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/bittorr... |
Date: |
Fri, 19 May 2006 14:50:47 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Branch:
Changes by: spiralvoice <address@hidden> 06/05/19 14:50:47
Modified files:
distrib : ChangeLog
src/networks/bittorrent: bTInteractive.ml
Log message:
patch #5105
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.833&tr2=1.834&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml.diff?tr1=1.90&tr2=1.91&r1=text&r2=text
Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.833 mldonkey/distrib/ChangeLog:1.834
--- mldonkey/distrib/ChangeLog:1.833 Thu May 18 17:28:44 2006
+++ mldonkey/distrib/ChangeLog Fri May 19 14:50:47 2006
@@ -14,6 +14,10 @@
ChangeLog
=========
+2006/05/19
+5105: BT: Avoid starting torrent which has the same name
+ as a currently downloading torrent
+
2006/05/18
5097: HTML: Improved DL multiline input button (jave)
5103: Fix compile bug in magiclib_stub.c on Solaris & NetBSD
Index: mldonkey/src/networks/bittorrent/bTInteractive.ml
diff -u mldonkey/src/networks/bittorrent/bTInteractive.ml:1.90
mldonkey/src/networks/bittorrent/bTInteractive.ml:1.91
--- mldonkey/src/networks/bittorrent/bTInteractive.ml:1.90 Sun May 14
19:09:21 2006
+++ mldonkey/src/networks/bittorrent/bTInteractive.ml Fri May 19 14:50:47 2006
@@ -60,6 +60,8 @@
lprintf "%s[BT] "
(log_time ()); lprintf
+exception Already_exists
+
let op_file_all_sources file =
let list = ref [] in
Hashtbl.iter (fun _ c ->
@@ -470,6 +472,11 @@
downloads_directory
torrent.torrent_name ^ ".torrent"
in
+ if Sys.file_exists torrent_diskname then
+ begin
+ if !verbose then lprintf_nl () "load_torrent_string: %s already exists,
ignoring" torrent_diskname;
+ raise Already_exists
+ end;
File.from_string torrent_diskname s;
if !verbose then
@@ -727,8 +734,10 @@
if (valid_torrent_extension url) then
try
if !verbose then lprintf_nl () "Not_found and trying to load %s" url;
- load_torrent_file url;
- "", true
+ try
+ load_torrent_file url;
+ "", true
+ with Already_exists -> "A torrent with this name is already in the
download queue", false
with e ->
lprintf_nl () "Exception %s while 2nd loading" (Printexc2.to_string
e);
let s = Printf.sprintf "Can not load load torrent file: %s"