mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 12:24:58 +00:00
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>
This commit is contained in:
parent
022a45e084
commit
4753711235
@ -90,6 +90,9 @@ static int do_lstat(
|
|||||||
if (fdata.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
|
if (fdata.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
|
||||||
fMode |= S_IFLNK;
|
fMode |= S_IFLNK;
|
||||||
|
|
||||||
|
if ((fMode & (S_IFDIR | S_IFLNK)) == (S_IFDIR | S_IFLNK)) // junction
|
||||||
|
fMode ^= S_IFLNK;
|
||||||
|
|
||||||
buf->st_ino = 0;
|
buf->st_ino = 0;
|
||||||
buf->st_gid = 0;
|
buf->st_gid = 0;
|
||||||
buf->st_uid = 0;
|
buf->st_uid = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user