From owner-cvs-all@FreeBSD.ORG Sat Jun 5 12:56:06 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51E7816A4CE; Sat, 5 Jun 2004 12:56:06 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15BDE43D3F; Sat, 5 Jun 2004 12:56:06 -0700 (PDT) (envelope-from tim@kientzle.com) Received: from kientzle.com (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i55JtO90057223; Sat, 5 Jun 2004 12:55:25 -0700 (PDT) (envelope-from tim@kientzle.com) Message-ID: <40C22518.6060406@kientzle.com> Date: Sat, 05 Jun 2004 12:55:04 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <20040605053115.45AE416A585@hub.freebsd.org> <20040605000326.B54841@root.org> In-Reply-To: <20040605000326.B54841@root.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: Tim Kientzle cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/lib/libarchive archive_read_extract.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jun 2004 19:56:06 -0000 Nate Lawson wrote: > On Fri, 4 Jun 2004, Tim Kientzle wrote: > >>+ * Yes, people really do type "tar -cf - foo/." for >>+ * reasons that I cannot fathom. > > That's what tab completion in tcsh does. Tab completion adds the slash, but not the dot, which is the issue here. I've noticed that "foo/." does force gtar to archive the dir target of a symlink, which may explain the usage. In particular, mkdir("foo/.") always fails, hence the need for an additional check. (I'm considering reworking this code to explicitly check for and remove a trailing "/." sequence before trying to create the dir.) >>+ if (stat(name, &st) == 0 && S_ISDIR(st.st_mode)) > ^^^^^^^ > Double spaces. Done on purpose. I find it makes such expressions easier to read. (The larger space visibly reflects the lower precedence and breaks the larger expression into easier-to-scan phrases.) If there's concensus that this is wrong, of course, I'll happily change it. Tim