Hello all,

When I already had the answer redacted and was about to click the "send" button, my computer died. This is the reason why I have been offline for four days.

Paul Eggert wrote:
Thanks for the bug report. Forwarding it to <[email protected]>, and
closing the coreutils bug.

Thank you very much Paul.

Douglas McIlroy wrote:
If FILE is not a directory, the shell command
ed FILE/
yields an incorrect diagnostic, "Is a directory".

Most, if not all, other utilities yield "No such file or directory".

This was done to imitate the diagnostic of libc in ed 0.2, but warning early instead of waiting until write time:

$ ed-0.2 FILE/
FILE/: No such file or directory
w
FILE/: Is a directory

It also prevents command 'f' from setting an obviously invalid default filename.

The easiest repair of all would be to change the wording so it
doesn't mimic a perror diagnostic, e.g. "Improper filename".

Agreed. Maybe "Invalid filename".

Paul Eggert wrote:
Another way to put it: if GNU ed wants to validate file names separately
and independently of the kernel (though I still don't see why), shouldn't
GNU ed do a complete job, consistently, with every file name it sees,
rather than a halfhearted job at just one opportunity?

Maybe a complete job is too much for ed. But checking a trivial and common case seemed worthwhile then. Version 1.20 includes several changes towards file name validation and early warning prompted by discussions in the list and by POSIX changes.


Best regards,
Antonio.

Reply via email to