From owner-svn-src-all@FreeBSD.ORG Thu Nov 27 05:14:36 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDEF1106564A; Thu, 27 Nov 2008 05:14:36 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDA498FC16; Thu, 27 Nov 2008 05:14:36 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAR5Eait076810; Thu, 27 Nov 2008 05:14:36 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAR5Ea1n076809; Thu, 27 Nov 2008 05:14:36 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811270514.mAR5Ea1n076809@svn.freebsd.org> From: Tim Kientzle Date: Thu, 27 Nov 2008 05:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185359 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2008 05:14:37 -0000 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);