ln: ln doesn't turn `/` in link target paths into `\` on Windows
Open
Nobody has claimed this yet.
P - Windows
U - ln
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
While most functions in coreutils correctly translate / in paths into \ on Windows, ln doesn't quite:
> mkdir test\dir
> >test\file echo Hello
> coreutils ln -fs test/dir symlink-dir
> coreutils ln -fs test/file symlink-file
> dir
:: snip ::
Directory of C:\foo
2024-05-30 10:03 <DIR> .
2024-05-30 10:02 <DIR> ..
2024-05-30 10:03 <SYMLINKD> symlink-dir [test/dir]
2024-05-30 10:03 <SYMLINK> symlink-file [test/file]
2024-05-30 10:03 <DIR> test
:: snip ::
Note how the link target paths still contain /, and the links are unusable:
> type symlink-file
The system cannot find the file specified.
> dir symlink-dir
:: snip ::
Directory of C:\foo\symlink-dir
File Not Found
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported commands on Windows, then locate the ln command implementation and its handling of link targets. Compare it with the other Windows path translations described in the issue; done means links created from targets such as test/dir and test/file resolve correctly and can be inspected with dir and type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100