|
From: | IDRUGO, ALVARO (ALVARO)** CTR ** |
Subject: | Re: [Bug-tar] segfault on solaris 11.1 with --remove-files in current directory |
Date: | Fri, 2 May 2014 21:02:19 +0000 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |