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

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

Open
floitsch opened this issue Feb 16, 2024 · 1 comment
Assignees

Comments

@floitsch
Copy link
Member

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 added a commit to toitlang/pkg-host that referenced this issue Feb 16, 2024
On Windows: Symbolic links with '/' instead of '\' are problematic.
@floitsch
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants