Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Fri, 5 May 2000 18:56:44 +0300 From: Paul Sokolovsky X-Mailer: The Bat! (v1.32) S/N A9B97A11 Reply-To: Paul Sokolovsky X-Priority: 3 (Normal) Message-ID: <6789.000505@is.lg.ua> To: "Diel, Robert" CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re: A simple one. CYGWIN_98 - 4.10 (BASH false error message) (secon d time newbie bug report) In-reply-To: <5933E79666CAD211AEF800105A5FDB37029248BB@chimsg1-nt.chi.wms.com> References: <5933E79666CAD211AEF800105A5FDB37029248BB AT chimsg1-nt DOT chi DOT wms DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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