diff options
author | Sven Strickroth <email@cs-ware.de> | 2013-06-25 16:46:06 +0200 |
---|---|---|
committer | Sven Strickroth <email@cs-ware.de> | 2013-06-25 16:46:06 +0200 |
commit | 4753711235b817082460c2781749c27ef2d9bc78 (patch) | |
tree | 6d9d34db89cf785e8ccad77c27f689218632c05f | |
parent | 022a45e0848d4cc517889aaf55573bf5f5004662 (diff) | |
download | libgit2-4753711235b817082460c2781749c27ef2d9bc78.tar.gz |
Correctly handle junctions
A junction has S_IFDIR | S_IFLNK set, however, only one makes sense.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
-rw-r--r-- | src/win32/posix_w32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index f04974428..036632e2a 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -90,6 +90,9 @@ static int do_lstat( if (fdata.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) fMode |= S_IFLNK; + if ((fMode & (S_IFDIR | S_IFLNK)) == (S_IFDIR | S_IFLNK)) // junction + fMode ^= S_IFLNK; + buf->st_ino = 0; buf->st_gid = 0; buf->st_uid = 0; |