mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-06 08:16:54 +00:00
tar: fix bug with -C and extracting directories
Problem reported by Denis Excoffier in <http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00034.html>. * src/extract.c (extract_dir): Use mkdirat, not mkdir. * tests/extrac16.at: New file, to test for this bug. * tests/Makefile.am (TESTSUITE_AT): Add it. * tests/testsuite.at: Include it. This file is a placeholder. It will be replaced with the actual ChangeLog by make dist. Run make ChangeLog if you wish to create it earlier.
This commit is contained in:
+1
-1
@@ -777,7 +777,7 @@ extract_dir (char *file_name, int typeflag)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
status = mkdir (file_name, mode);
|
||||
status = mkdirat (chdir_fd, file_name, mode);
|
||||
if (status == 0)
|
||||
{
|
||||
current_mode = mode & ~ current_umask;
|
||||
|
||||
Reference in New Issue
Block a user