Erlang/OTP Forums

Author Message

<  Erlang bugs mailing list  ~  [erlang-bugs] filelib bug

Guest
Posted: Mon Sep 04, 2006 10:47 am Reply with quote
Guest
There's a bug in filelib:wildcard/2, as illustrated by this example:

Eshell V5.5.1 (abort with ^G)
1> filelib:wildcard("foo*", "/tmp").
["foo.1","foo.2","foo.3","fooa","foobaz.log","foobaz.sh"]

this is correct.

but then i try:


2> filelib:wildcard("foo*", "//tmp").
["oo.1","oo.2","oo.3","ooa","oobaz.log","oobaz.sh"]
3> filelib:wildcard("foo*", "/tmp/").
["oo.1","oo.2","oo.3","ooa","oobaz.log","oobaz.sh"]


which obviously is wrong.


a simple fix is to do a filename:join() on the Cwd in filelib.


/martin
_______________________________________________
erlang-bugs mailing list
erlang-bugs@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-bugs
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum