Commit 60c6716
Cygwin: symlink_native: allow linking to
In 827743a (Cygwin: symlink_native: allow linking to `..`,
2025-06-20), I fixed linking to `..` (which had inadvertently
targeted an incorrect location prior to that fix), but inadvertently
broke linking to `.` (which would now try to pass the empty string as
`lpTargetFileName` to `CreateSymbolicLinkW()`, failing with an
`ERROR_INVALID_REPARSE_DATA` which would be surfaced as "Permission
denied").
Let's fix this by special-casing an empty string as path as referring to
the current directory.
Note: It is unclear to me why the `winsymlinks:nativestrict` code path
even tries to simplify the symbolic link's target path (e.g. turn an
absolute path into a relative one). As long as it refers to a regular
Win32 file or directory, I would think that even something like
`././c` should have only the slashes converted, not the path
simplified (i.e. `.\.\c` instead of `c`). But that's a larger
discussion, and I would like to have the bug worked around swiftly.
Fixes: 827743a (Cygwin: symlink_native: allow linking to `..`, 2025-06-20)
Signed-off-by: Johannes Schindelin <[email protected]>. again1 parent d704d04 commit 60c6716
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1895 | 1895 | | |
1896 | 1896 | | |
1897 | 1897 | | |
1898 | | - | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1899 | 1902 | | |
1900 | 1903 | | |
1901 | 1904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
0 commit comments