Mail Archives: cygwin/2000/05/05/10:58:46
Hello Robert,
Friday, May 05, 2000, 5:06:27 PM, you wrote:
DR> To whom it may concern,
DR> A false error message exists in the built in CD command in bash. If you
DR> change directory to a file, it says the file is a directory. For example,
DR> cd /bin/ls.exe
DR> BASH.EXE: cd: bin/ls.exe: is a directory
It is more or less known problem, caused by not very
comprehensive, and sometimes wrong, mapping of native win32 errnos to
POSIX errnos. The matter even worsened by fact that nt and 9x report
different error codes under same circumstances. Or vice-versa,
different functions may produce different errors for the same event.
I even won't be surpised if some error code have complementary meaning
for 9x and nt %) .
I observed behaviour described above in b20/win9x. It is caused by
wrong (for 9x) mapping ERROR_DIRECTORY -> EISDIR. It is hard to guess, but
per Microsoft, ERROR_DIRECTORY error code means 'not a directory' (as for
9x, as for error produced by SetCurrentDirectory()), so it should be
mapped to ENOTDIR.
Mapping table lives in winsup/errno.cc . The clean approach would
be to put current cygwin map aside, take some official
error-describing doc (if none else, then output from FormatMessage()),
and construct mapping from scratch. Then, compare to current cygwin
mapping. Where differences arise, make testcases. Searching archives
would also help, there were reported some particular suggestions (as
mine above).
DR> Robert
Best regards,
Paul mailto:paul-ml AT is DOT lg DOT ua
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -