caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Bug in Filename.basename?
@ 2007-09-05  8:45 Erik de Castro Lopo
  2007-09-05 10:41 ` [Caml-list] " Richard Jones
  0 siblings, 1 reply; 18+ messages in thread
From: Erik de Castro Lopo @ 2007-09-05  8:45 UTC (permalink / raw)
  To: caml-list

Hi all,

I think I have found a bug in the above function.
        Objective Caml version 3.10.0

    # let x = Filename.basename "a/b/c" ;;
    val x : string = "c"
    # let x = Filename.basename "a/b/c/" ;;
    val x : string = "."

The first result is fine, but second result is definitely not what
one would reasonably expect.

For instance, the basename program in Linux gives:

    > basename a/b/c/
    c

Erik

-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"C++ is a language strongly optimized for liars and people who
go by guesswork and ignorance." -- Erik Naggum


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-09-06 10:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05  8:45 Bug in Filename.basename? Erik de Castro Lopo
2007-09-05 10:41 ` [Caml-list] " Richard Jones
2007-09-05 11:10   ` Erik de Castro Lopo
2007-09-05 11:25     ` Oliver Bandel
2007-09-05 12:00       ` Erik de Castro Lopo
2007-09-05 13:06         ` Markus E L
2007-09-05 20:39         ` Oliver Bandel
2007-09-05 21:03           ` Oliver Bandel
2007-09-06  4:52           ` skaller
2007-09-06  7:09             ` Christophe Raffalli
2007-09-06  9:51             ` Oliver Bandel
2007-09-06  9:32           ` Markus E L
2007-09-06 10:00             ` Oliver Bandel
2007-09-05 12:15       ` Mattias Engdegård
2007-09-05 20:54         ` Oliver Bandel
2007-09-05 12:37     ` Brian Hurt
2007-09-05 13:06     ` Markus E L
2007-09-05 12:10   ` Olivier Andrieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).