We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 79fa9d1 + a29014e commit 788da26Copy full SHA for 788da26
compat/win32/fscache.c
@@ -596,6 +596,18 @@ int fscache_lstat(const char *filename, struct stat *st)
596
if (!fse)
597
return -1;
598
599
+ /*
600
+ * Special case symbolic links: FindFirstFile()/FindNextFile() did not
601
+ * provide us with the length of the target path.
602
+ */
603
+ if (fse->u.s.st_size == MAX_LONG_PATH && S_ISLNK(fse->st_mode)) {
604
+ char buf[MAX_LONG_PATH];
605
+ int len = readlink(filename, buf, sizeof(buf) - 1);
606
+
607
+ if (len > 0)
608
+ fse->u.s.st_size = len;
609
+ }
610
611
/* copy stat data */
612
st->st_ino = 0;
613
st->st_gid = 0;
0 commit comments