Re: error code for non-existent directory

[email protected] (Joerg Schilling) Mon, 04 May 2009 17:02:03 +0200
Newsgroups gmane.comp.archivers.star.user
Message-ID <49ff036b.5ixna1pyU+OkANVy%[email protected]>
Lasse Kliemann <[email protected]> wrote:

> Directories 'a' and 'b' both do not exist:
>
> $ star -c -diff -C a . b
> star: No such file or directory. Cannot change directory to 'a'.
> star: No such file or directory. Cannot change directory to 'b'.
> $ echo $?
> 2
>
> This looks okay.
>
> Now I create directory 'b'.
>
> $ star -c -diff -C a . b
> star: No such file or directory. Cannot change directory to 'a'.
> star: 0 blocks + 1024 bytes (total of 1024 bytes =3D 1.00k).
> $ echo $?
> 0
>
> Shouldn't this also return an error code !=3D 0?

What star does is aligned with normal tar behavior. If a file from the arg =
list =

cannot be archived, skip to the next one. This create an empty archive in y=
our =

case.

I would need to add code to count the chdir errors ;-)

> I also tried adding errctl=3D'ABORT|ALL *', but this does not make =

> a difference.

I am planning to add a way to change the default behavior to skip the error
to abort by using: errctl=3D'ABORT|CHDIR *'

J=F6rg

-- =

 EMail:[email protected] (home) J=F6rg Schilling D-13353 Be=
rlin
       [email protected]                (uni)  =

       [email protected] (work) Blog: http://schily.blogs=
pot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily