[Pkg-gnupg-commit] [gnupg2] 75/292: tools: Ignore existing directories in gpgtar.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Nov 21 06:31:27 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit fbc83c0cdd390473c044953fb774571ffc636c6d
Author: Justus Winter <justus at g10code.com>
Date: Tue Oct 4 12:44:14 2016 +0200
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 at g10code.com>
---
tools/gpgtar-extract.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c
index cee609c..8641126 100644
--- a/tools/gpgtar-extract.c
+++ b/tools/gpgtar-extract.c
@@ -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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list