Package: lftp
Version: 4.0.2-1
Severity: normal

The option -P to mirror command is not parsed properly and not accessing
argument when it should like the --parallel option.

example :

lftp localhost> mirror -P 5 tmp/
mirror: Access failed: 404 Not Found (/tmp/5)
1 error detected

Patch attached to fix it properly.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lftp depends on:
ii  libc6                     2.10.1-7       GNU C Library: Shared libraries
ii  libgcc1                   1:4.4.2-3      GCC support library
ii  libgnutls26               2.8.5-2        the GNU TLS library - runtime libr
ii  libncurses5               5.7+20090803-2 shared libraries for terminal hand
ii  libreadline6              6.0-5          GNU readline and history libraries
ii  netbase                   4.37           Basic TCP/IP networking system

lftp recommends no packages.

lftp suggests no packages.

-- no debconf information
--- lftp-4.0.2/src/MirrorJob.cc~        2009-08-11 11:02:48.000000000 +0100
+++ lftp-4.0.2/src/MirrorJob.cc 2009-12-02 11:25:28.000000000 +0000
@@ -1403,7 +1403,7 @@
       flags|=MirrorJob::RETR_SYMLINKS;
 
    args->rewind();
-   while((opt=args->getopt_long("esi:x:I:X:nrpcRvN:LPa",mirror_opts,0))!=EOF)
+   while((opt=args->getopt_long("esi:x:I:X:nrpcRvN:LaP:",mirror_opts,0))!=EOF)
    {
       switch(opt)
       {
@@ -1529,7 +1529,9 @@
         flags|=MirrorJob::IGNORE_TIME|MirrorJob::IGNORE_SIZE;
         break;
       case('P'):
-        if(optarg)
+     if (optarg && atoi(optarg) == 0)
+        parallel=3;
+        else if(optarg)
            parallel=atoi(optarg);
         else
            parallel=3;

Reply via email to