Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Nov 2008 05:14:36 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185359 - head/usr.bin/tar
Message-ID:  <200811270514.mAR5Ea1n076809@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Thu Nov 27 05:14:36 2008
New Revision: 185359
URL: http://svn.freebsd.org/changeset/base/185359

Log:
  If we're unable to chdir() to a directory that we know exists,
  that should result in a non-zero return value.
  
  In particular, this should address the issue that David Wolfskill
  ran into with a somewhat flaky NFS mount resulting in a damaged
  archive even though tar returned success.
  
  MFC after:	4 days

Modified:
  head/usr.bin/tar/write.c

Modified: head/usr.bin/tar/write.c
==============================================================================
--- head/usr.bin/tar/write.c	Thu Nov 27 04:40:37 2008	(r185358)
+++ head/usr.bin/tar/write.c	Thu Nov 27 05:14:36 2008	(r185359)
@@ -655,8 +655,10 @@ write_hierarchy(struct bsdtar *bsdtar, s
 		const struct stat *st = NULL, *lst = NULL;
 		int descend;
 
-		if (tree_ret == TREE_ERROR_DIR)
+		if (tree_ret == TREE_ERROR_DIR) {
 			bsdtar_warnc(bsdtar, errno, "%s: Couldn't visit directory", name);
+			bsdtar->return_value = 1;
+		}
 		if (tree_ret != TREE_REGULAR)
 			continue;
 		lst = tree_current_lstat(tree);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811270514.mAR5Ea1n076809>