[erlang-bugs] filelib bug

Martin Bjorklund mbj@REDACTED
Mon Sep 4 12:46:18 CEST 2006


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



More information about the erlang-bugs mailing list