[erlang-bugs] filelib bug

Gunilla Arendt <>
Fri Oct 27 10:10:38 CEST 2006


Hi Martin,

Thanks for the bug report. The error has been fixed in R11B-2.

Regards,
Gunilla

Martin Bjorklund wrote:
> 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