| 1 |
# Process this file with autom4te to create testsuite. -*- Autotest -*- |
| 2 |
|
| 3 |
# Test suite for GNU tar. |
| 4 |
# Copyright 2009-2023 Free Software Foundation, Inc. |
| 5 |
|
| 6 |
# This file is part of GNU tar. |
| 7 |
|
| 8 |
# GNU tar is free software; you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License as published by |
| 10 |
# the Free Software Foundation; either version 3 of the License, or |
| 11 |
# (at your option) any later version. |
| 12 |
|
| 13 |
# GNU tar is distributed in the hope that it will be useful, |
| 14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
# GNU General Public License for more details. |
| 17 |
|
| 18 |
# You should have received a copy of the GNU General Public License |
| 19 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
# Description: Called with --remove-files, tar 1.23 failed |
| 22 |
# to remove a directory if it contained symlinks to another files |
| 23 |
# within that directory. |
| 24 |
# Reported-by: Alexander Kozlov <[email protected]> |
| 25 |
# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00028.html |
| 26 |
# <[email protected]> |
| 27 |
|
| 28 |
AT_SETUP([remove-files with symbolic links]) |
| 29 |
AT_KEYWORDS([create remove-files remfiles03]) |
| 30 |
|
| 31 |
AT_CHECK([ |
| 32 |
mkdir a |
| 33 |
mkdir a/b |
| 34 |
ln -s b a/c || AT_SKIP_TEST |
| 35 |
tar --remove-files -cf a.tar a |
| 36 |
genfile --stat a |
| 37 |
], |
| 38 |
[0], |
| 39 |
[], |
| 40 |
[genfile: stat(a) failed: No such file or directory |
| 41 |
]) |
| 42 |
|
| 43 |
AT_CLEANUP |