toit icon indicating copy to clipboard operation
toit copied to clipboard

On Windows: Toit can't read symbolic links that have "/" in the target-path.

Open floitsch opened this issue 1 year ago • 1 comments

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.

floitsch avatar Feb 16 '24 15:02 floitsch

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

floitsch avatar Feb 16 '24 17:02 floitsch