This allows LFS to create symbolic and hard links on Windows.
On Windows, hard links may not be created to directories, so this function first uses PathIsDirectory to check whether the link target is a directory. This function is included in "Shlwapi.h" (Shell Path Handling Functions). I included this file in the Windows build files as well.
Unfortunately, this breaks test.lua on Windows now because links are being created, but symlinkattributes still cannot return the correct mode. If time permits, I'll add a Windows function that checks for link targets in the future.
I wasn't sure whether 1.7 or the master branch is the better target for this pull request. Feel free to correct me or to tell me any other suggestions!
Coverage remained the same at 80.348% when pulling e3d79e73fe3e291e040de58ed92f106fdc738faa on Eroica:1.7 into 77c0e0f992329fa1812e5bb948420e9ebb1798c4 on keplerproject:1.7.
This allows LFS to create symbolic and hard links on Windows.
On Windows, hard links may not be created to directories, so this function first uses
PathIsDirectory
to check whether the link target is a directory. This function is included in "Shlwapi.h" (Shell Path Handling Functions). I included this file in the Windows build files as well.Unfortunately, this breaks
test.lua
on Windows now because links are being created, butsymlinkattributes
still cannot return the correct mode. If time permits, I'll add a Windows function that checks for link targets in the future.I wasn't sure whether 1.7 or the master branch is the better target for this pull request. Feel free to correct me or to tell me any other suggestions!