mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
tools: Ignore existing directories in gpgtar.
* tools/gpgtar-extract.c (extract_directory): Ignore existing directories now that we have '--directory'. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
eda17649f8
commit
fbc83c0cdd
@ -122,11 +122,15 @@ extract_directory (const char *dirname, tar_header_t hdr)
|
||||
if (fname[strlen (fname)-1] == '/')
|
||||
fname[strlen (fname)-1] = 0;
|
||||
|
||||
/* Note that we don't need to care about EEXIST because we always
|
||||
extract into a new hierarchy. */
|
||||
if (! opt.dry_run && gnupg_mkdir (fname, "-rwx------"))
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
if (gpg_err_code (err) == GPG_ERR_EEXIST)
|
||||
{
|
||||
/* Ignore existing directories while extracting. */
|
||||
err = 0;
|
||||
}
|
||||
|
||||
if (gpg_err_code (err) == GPG_ERR_ENOENT)
|
||||
{
|
||||
/* Try to create the directory with parents but keep the
|
||||
|
Loading…
x
Reference in New Issue
Block a user