Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link handling on Windows #714

Merged
merged 3 commits into from
Apr 18, 2019

Commits on Apr 16, 2019

  1. Remove dead code of cp_r/2, xcopy_win32/2 and cp_r_win32/2.

    The bulk of the code is hidden behind opposite checks:
    * os:type() /= {win32, _} in symlink_or_copy/2
    * os:type() == {win32, _} in cp_r/2
    
    symlink_or_copy/2 is always using win32_symlink/2 when file:make_symlink/2 fails.
    emtenet authored and tolbrino committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    9d47ab0 View commit details
    Browse the repository at this point in the history
  2. Do not create a junction (soft link) for files

    When symlink_or_copy/2 cannot use file:make_symlink/2 on Windows due to the
    user lacking SeCreateSymbolicLinkPrivilege it tries a fall back.
    
    Detect the source type and use an appropriate fall back:
    * junction for directories and,
    * copy for files.
    
    Improve error detection in win32_make_junction/2 and make it repeatable when
    the target exists
    emtenet authored and tolbrino committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    07943b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    476b439 View commit details
    Browse the repository at this point in the history