cvs commit: src/lib/libarchive archive_read_extract.c
Tim Kientzle
tim at kientzle.com
Sat Jun 5 19:56:06 GMT 2004
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
More information about the cvs-src
mailing list