mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 02:22:43 +00:00
When we are extracting directory with --unlink option and the directory
already exists don't spew bogus "Cannot unlink" error and exit with non-zero code. Reported by: bde
This commit is contained in:
parent
6e02167b57
commit
b19918bd36
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99345
@ -1140,8 +1140,12 @@ extract_archive (void)
|
||||
else if (typeflag == GNUTYPE_DUMPDIR)
|
||||
skip_member ();
|
||||
|
||||
if (! prepare_to_extract (CURRENT_FILE_NAME))
|
||||
break;
|
||||
{
|
||||
struct stat st;
|
||||
if (stat (CURRENT_FILE_NAME, &st) != 0 || !S_ISDIR (st.st_mode))
|
||||
if (! prepare_to_extract (CURRENT_FILE_NAME))
|
||||
break;
|
||||
}
|
||||
|
||||
mode = ((current_stat.st_mode
|
||||
| (we_are_root ? 0 : MODE_WXUSR))
|
||||
|
Loading…
Reference in New Issue
Block a user