Package: arj
Version: 3.10.22-4
Severity: normal

This works:

    % arj a /tmp/arc2.arj /mnt/c/My\ Documents/No* ; echo $?
    ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [07 Dec 2007]

    Creating archive  : /tmp/arc2.arj
    Adding    /mnt/c/My Documents/Notes on PDL.doc   59.9%    
    Adding    /mnt/c/My Documents/Notes on PDL.zip  100.0%    
         2 file(s)
    0

This doesn't:

    % arj a /tmp/arc1.arj /mnt/c/My\ Documents/N* ; echo $?
    ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [07 Dec 2007]
    
    Creating archive  : /tmp/arc1.arj
         0 file(s)
    Can't find /mnt/c/My Documents/Notes on PDL.doc
    Can't find /mnt/c/My Documents/Notes on PDL.zip

    Found     2 error(s)!
    0

The only difference is the the letter "o" in "No*".  I fired 
up 'strace', and after some trial and error discovered
the shorter wildcard "N*" matched a directory, and the shell 
expansion put said directory first:

    % file /mnt/c/My\ Documents/Naaa 
    /mnt/c/My Documents/Naaa: directory

    % arj a /tmp/arc.arj /mnt/c/My\ Documents/Naaa "/mnt/c/My Documents/Notes 
on PDL.doc" ; echo $?
    ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [07 Dec 2007]

    Updating archive  : /tmp/arc.arj
    Archive created: 2007-12-17 03:54:22, modified: 2007-12-17 03:54:22
         0 file(s)
    Can't find /mnt/c/My Documents/Notes on PDL.doc
    
    Found     1 error(s)!
    1

So 'arj' parses 'Naaa' as the base directory, and looks for the other 
files within.  It's uncommon parsing behavior for a file type
to act like a switch, but there nothing syntactically wrong with that.

The bug is how the resulting error message tends to mislead users who
use wildcards and may not know whether their first file is a directory.
The error message should print full pathnames instead of
relative pathnames, e.g.:

    Archive created: 2007-12-17 03:54:22, modified: 2007-12-17 03:54:22 
         0 file(s) 
    Can't find /mnt/c/My\ Documents/Naaa/mnt/c/My Documents/Notes on PDL.doc


Hope this helps...





-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-k7 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages arj depends on:
ii  libc6                         2.7-4      GNU C Library: Shared libraries

arj recommends no packages.

-- no debconf information



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

Reply via email to