summaryrefslogtreecommitdiff
path: root/tests/diff/patch.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-06-07 10:20:35 +0200
committerPatrick Steinhardt <ps@pks.im>2019-06-13 10:41:15 +0200
commitf7c6795f48850eec94793d22b5fd621b61cd2466 (patch)
treed5b1c239e8934e775eb647917b299042d5155a9f /tests/diff/patch.c
parent01dda5fffcc8527d20eb65045f68c8f30697cba9 (diff)
downloadlibgit2-f7c6795f48850eec94793d22b5fd621b61cd2466.tar.gz
path: only treat paths starting with '\' as absolute on Win32
Windows-based systems treat paths starting with '\' as absolute, either referring to the current drive's root (e.g. "\foo" might refer to "C:\foo") or to a network path (e.g. "\\host\foo"). On the other hand, (most?) systems that are not based on Win32 accept backslashes as valid characters that may be part of the filename, and thus we cannot treat them to identify absolute paths. Change the logic to only paths starting with '\' as absolute on the Win32 platform. Add tests to avoid regressions and document behaviour.
Diffstat (limited to 'tests/diff/patch.c')
0 files changed, 0 insertions, 0 deletions