elixir-lang/elixir — pull request #2472 by michaelkschmidt (2014-07-01 16:41:45+00:00)
Title: Use absolute symbolic links on windows

This re-adds support for doing symlinks inside of _build instead of copying on Windows. This helps greatly when dealing with static content inside of the "priv" directory.

The fundamental bug is that file:make_symlink() is creating a symbolic link for a file instead of a directory (they are different on Windows). The Erlang code responsible for making the decision (file or directory) is only looking at the source path, which causes it to not find the correct source location (relative symbolic links in windows are relative to the the link, not to the current working directory).

This patch works around the issue by creating an absolute link (Windows only). This causes the Erlang code to find the directory and make the correct type of link.