Commit 9d63606
When looking at potentially long paths: leave drive-less absolute paths intact (#4592)
Git for Windows does not handle symbolic links correctly when their
target is an absolute path without a drive prefix: a drive prefix is
added.
These type of paths, however, are completely legitimate on Windows, they
are _kind of_ absolute paths, as they are still relative to the current
directory's drive. So let's handle them as intended: by ensuring that
targets that have no drive prefix _before_ normalization still don't
have a drive prefix _after_ normalization.
Oddly enough, the code that needs to be patched seems to have nothing to
do with symbolic links, but all with long paths. Yet this is precisely
the code path taken by `win32_create_symlink()` that adds that drive
prefix (via normalization). The reason why only symbolic links seem to
be affected is that this is the only usage where the resulting path is
persisted instead of merely used in subsequent function calls.
This fixes #4586.2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3851 | 3851 | | |
3852 | 3852 | | |
3853 | 3853 | | |
3854 | | - | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
3855 | 3860 | | |
3856 | 3861 | | |
3857 | 3862 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
0 commit comments