summaryrefslogtreecommitdiff
path: root/src/win32/findfile.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2014-12-01 13:09:58 -0500
committerEdward Thomson <ethomson@microsoft.com>2014-12-16 10:08:43 -0600
commitcceae9a25d0bed8b00f4981e051d5f380ef54401 (patch)
tree37fc849d60ba24f6c6ac896322d6e8ac5f7d902c /src/win32/findfile.c
parent09debe1213b9c979e21106ccbe9d420f8511f4eb (diff)
downloadlibgit2-cceae9a25d0bed8b00f4981e051d5f380ef54401.tar.gz
win32: use NT-prefixed "\\?\" paths
When turning UTF-8 paths into UCS-2 paths for Windows, always use the \\?\-prefixed paths. Because this bypasses the system's path canonicalization, handle the canonicalization functions ourselves. We must: 1. always use a backslash as a directory separator 2. only use a single backslash between directories 3. not rely on the system to translate "." and ".." in paths 4. remove trailing backslashes, except at the drive root (C:\)
Diffstat (limited to 'src/win32/findfile.c')
-rw-r--r--src/win32/findfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/win32/findfile.c b/src/win32/findfile.c
index 86d4ef5bd..de27dd060 100644
--- a/src/win32/findfile.c
+++ b/src/win32/findfile.c
@@ -5,6 +5,7 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
+#include "path_w32.h"
#include "utf-conv.h"
#include "path.h"
#include "findfile.h"