List Info

Thread: filelib:wildcard




filelib:wildcard
user name
2007-09-10 04:57:36
Hi,

  I'm getting strange results with filelib:wildcard/2
(tested in R11B-1 and
R11B-5):

3> filelib:wildcard("ebin/*.app",
"/home/samuel/local/src/yaws").
[]
4> filelib:wildcard("*/*.app",
"/home/samuel/local/src/yaws").
["ebin/yaws.app"]


  If I move to Cwd it works as I expected (even though it is
a symlink):

8> cd("/home/samuel/local/src/yaws").
/var/local/scratch/samuel/src/yaws-1.58
ok
9> filelib:wildcard("ebin/*.app",
"/home/samuel/local/src/yaws").
["ebin/yaws.app"]

  If this is a bug, a simple workaround is using
filelib:wildcard/1 and
filename:join/2 to build an absolute wildcard.

  Regards
-- 
	Samuel
_______________________________________________
erlang-bugs mailing list
erlang-bugserlang.org
ht
tp://www.erlang.org/mailman/listinfo/erlang-bugs

Re: filelib:wildcard
user name
2007-09-26 04:07:19
Thanks for the bug report. It indeed seem to be a bug.

I've added it to my to-do and hope to correct it for the
R12B release.

/Bjorn

Samuel Rivas <samuelrivasudc.es> writes:

> Hi,
> 
>   I'm getting strange results with filelib:wildcard/2
(tested in R11B-1 and
> R11B-5):
> 
> 3> filelib:wildcard("ebin/*.app",
"/home/samuel/local/src/yaws").
> []
> 4> filelib:wildcard("*/*.app",
"/home/samuel/local/src/yaws").
> ["ebin/yaws.app"]
> 
> 
>   If I move to Cwd it works as I expected (even though
it is a symlink):
> 
> 8> cd("/home/samuel/local/src/yaws").
> /var/local/scratch/samuel/src/yaws-1.58
> ok
> 9> filelib:wildcard("ebin/*.app",
"/home/samuel/local/src/yaws").
> ["ebin/yaws.app"]
> 
>   If this is a bug, a simple workaround is using
filelib:wildcard/1 and
> filename:join/2 to build an absolute wildcard.
> 
>   Regards
> -- 
> 	Samuel
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugserlang.org
> ht
tp://www.erlang.org/mailman/listinfo/erlang-bugs
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-bugs mailing list
erlang-bugserlang.org
ht
tp://www.erlang.org/mailman/listinfo/erlang-bugs

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )