This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A simple one. CYGWIN_98 - 4.10 (BASH false error message) (secon d time newbie bug report)


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@is.lg.ua



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]