toit
toit copied to clipboard
On Windows: Toit can't read symbolic links that have "/" in the target-path.
After creating a symbolic link that points to "../foo.txt", Toit can't read that file anymore. Replacing the '/' with '' is enough to make it work.
Powershell and bash correctly manage to read the file. In fact they don't even show the difference for the two symlinks.
Toit has also problems if we use the path that readlink gives back for absolute paths.
import host.file
main:
file.link --file --source="foo.txt" --target="c:\\some\\absolute\\path"
current-link := file.readlink "foo.txt" // => \??\c:\some\absolute\path
file.link --file --source="foo2.txt" --target=current-link
file.read-content "foo2.txt" // => ERROR