Date: Sat, 05 Jun 2004 12:55:04 -0700 From: Tim Kientzle <tim@kientzle.com> To: Nate Lawson <nate@root.org> Cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/lib/libarchive archive_read_extract.c Message-ID: <40C22518.6060406@kientzle.com> In-Reply-To: <20040605000326.B54841@root.org> References: <20040605053115.45AE416A585@hub.freebsd.org> <20040605000326.B54841@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40C22518.6060406>