From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA12046; Wed, 6 Aug 2003 18:25:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA30878 for ; Wed, 6 Aug 2003 18:25:00 +0200 (MET DST) Received: from opus.davidb.org (66-75-152-1.san.rr.com [66.75.152.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h76GOxT13170 for ; Wed, 6 Aug 2003 18:24:59 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 19kR2l-0007kD-00; Wed, 06 Aug 2003 09:21:43 -0700 Date: Wed, 6 Aug 2003 09:21:43 -0700 From: David Brown To: Richard Jones Cc: caml-list@inria.fr Subject: Re: [Caml-list] Unix.stat sometimes fails on Win32 port Message-ID: <20030806162143.GA29738@davidb.org> References: <20030806100225.GA27730@redhat.com> <20030806143902.GA29030@davidb.org> <20030806144949.GA29704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030806144949.GA29704@redhat.com> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bug:01 incorrectly:01 pathname:01 formed:98 0700,:01 06,:02 unix:02 dave:03 wrote:03 aug:05 argue:05 detect:06 path:06 wrap:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 06, 2003 at 03:49:49PM +0100, Richard Jones wrote: > On Wed, Aug 06, 2003 at 07:39:02AM -0700, David Brown wrote: > > Unix is being nice to you in stripping off the final slash. Would it be > > possible to wrap the stat call in something that checks for and removes > > a trailing slash? > > I worked around it by adding a "." to the end of the path in my > "is_dir" function if it's Windows and if it ends with a "\\" already, > but that still doesn't stop it from being a bug. But, it would be just as valid to argue that Unix has a bug in that it doesn't detect an incorrectly formed pathname. Dave Brown ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners