ERL_LIBS and Windows (minor quirk)

Steve Davis <>
Tue Jan 5 02:22:57 CET 2010

On Windows, and unlike code:add_path, setting the ERL_LIBS environment 
variable adds paths with a double-backslash... e.g.:


...results in:


Thus it is possible to add duplicate paths:

1> code:get_path().
2> code:add_patha("D:/Erlang/lib/yaws/ebin").
3> code:get_path().

Since code:add_path converts "\\" to "/" you can even do:

2> code:add_patha("D:\\Erlang\\lib/yaws/ebin").
3> code:get_path().

...and get the exact same result!

Of course, the real problem here is the design of the underlying OS (in 
many more ways than just this oddity), but perhaps somebody will be 
inspired to tidy this one up as it may have some (if rather tiny) effect 
on the performance of the code server.


More information about the erlang-bugs mailing list