nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] attach

2012-09-15 11:26:32
Hi,

David Levine <levinedl(_at_)acm(_dot_)org> writes:
Note that whatnow's attach will continue to allow attachment of
directories because it expands those out to their contents.  It
doesn't check what the contents are, though.  That's why we needed
to add this check.

I wonder if whatnow's `attach foo' attaching foo/* when it's a directory
is surprising and it would be better to error, forcing the user to
specify foo/* if that's what they want.  Especially if foo wasn't the
single explicitly named argument but itself part of a glob expansion
before ls(1) was let loose.  Using `ls -d' would stop it expanding foo
to its contents allowing later code to stat(2) that it's not a plain
file.

I suppose ditching ls(1) for glob or wordexp would also stop this being
the default behaviour.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>