Package: transmission-cli
Version: 1.22-1
Severity: grave
Justification: renders package unusable
Tags: patch

When creating a torrent and chosing a directory as a source (-c),
file-names in the torrent file are cropped (first character missing) if
the directory name ends with a slash, which happen in most of the case
because we use bash autocompletion (and it's hard to guess that this
final slash is the source of the problem, I had to read the code to
understand that!)

This leads to the inability to seed the torrent because the client using
the .torrent file cannot find the files it refers to.

I propose the following patch to work around the problem :

--- libtransmission/makemeta.c.old    2009-06-19 11:21:27.000000000 +0200
+++ libtransmission/makemeta.c    2009-06-19 11:21:37.000000000 +0200
@@ -274,7 +274,7 @@
              tr_benc                         * uninitialized_path )
 {
     const char *pch, *prev;
-    const size_t topLen = strlen(topFile) + 1; /* +1 for '/' */
+    const size_t topLen = strlen(topFile);
     int n;
 
     /* get the file size */





if topFile contains a final slash, it will be taken in account by
strlen. So far, this patch seems to cause no side effects neither with
-cli nor -gtk.

Regards

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages transmission-cli depends on:
ii  libc6                   2.7-18           GNU C Library: Shared libraries
ii  libcurl3                7.18.2-8lenny2   Multi-protocol file
transfer libra
ii  libssl0.9.8             0.9.8g-15+lenny1 SSL shared libraries
ii  transmission-common     1.22-1           free, lightweight
BitTorrent clien

transmission-cli recommends no packages.

transmission-cli suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to