Closed
Description
SwiftPM creates a symbolic link in the .build directory to a sibling directory for backwards compatibility reasons. That link is currently in 6.0 not created correctly on Windows.
For Windows we check whether the destPath is a directory to add the SYMBOLIC_LINK_FLAG_DIRECTORY flag when creating the link. However, we don't check whether it's a relative path and just call fileExists to fetch the isDirectory boolean. That assumes the path is relative to the current directory not the symbolic link path.
I notice in corelibs-foundation, the path is resolved correctly before checking if it's a directory:
let resolvedDest =
destPath.isAbsolutePath ? destPath
: joinPath(prefix: path.deletingLastPathComponent,
suffix: destPath)