Hi Paul,

yes, the patch works exactly as you described: no segfault anymore, but an
error, that can be fixed with the -C parameter.
Thank you very much!

@Joerg: In this case the output of pstack was more or less the same as the
output of gdb. But your command for "fixing" null pointer bugs looks very
interesting. I haven't seen that library before.

Thorsten



2014-04-29 23:30 GMT+02:00 Paul Eggert <[email protected]>:

> Thanks for reporting that.  It's a bug on GNU/Linux too.  I installed the
> attached patch; please give it a try if you have the time.
>
> I should mention that older versions of GNU tar did not try to remove
> directories in this case, which explains why you didn't see a problem with
> tar trying to remove ".".   With the fix, tar will complain that it can't
> remove ".", which is arguably the correct behavior.  To have the fixed tar
> remove "." without complaining, please use the -C option, e.g., something
> like this:
>
> $ mkdir test
> $ touch test/foo
> $ tar --remove-files -cf test.tar -C test .
> $ ls -al test
> ls: cannot access test: No such file or directory
> $ tar -tvf test.tar
> drwxr-xr-x eggert/eggert     0 2014-04-29 14:26 ./
> -rw-r--r-- eggert/eggert     0 2014-04-29 14:26 ./foo
>
>

Reply via email to