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 71d253f + f1de7e3 commit 030d815Copy full SHA for 030d815
compat/win32/fscache.c
@@ -597,6 +597,18 @@ int fscache_lstat(const char *filename, struct stat *st)
597
if (!fse)
598
return -1;
599
600
+ /*
601
+ * Special case symbolic links: FindFirstFile()/FindNextFile() did not
602
+ * provide us with the length of the target path.
603
+ */
604
+ if (fse->u.s.st_size == MAX_LONG_PATH && S_ISLNK(fse->st_mode)) {
605
+ char buf[MAX_LONG_PATH];
606
+ int len = readlink(filename, buf, sizeof(buf) - 1);
607
+
608
+ if (len > 0)
609
+ fse->u.s.st_size = len;
610
+ }
611
612
/* copy stat data */
613
st->st_ino = 0;
614
st->st_gid = 0;
0 commit comments