Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When looking at potentially long paths: leave drive-less absolute pat…
…hs 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.
- Loading branch information