Skip to content

Commit 12980c3

Browse files
committed
Merge pull request #220 from lchiocca/master
The stat() method should not be dependent on the core.symlinks config entry
2 parents 658589f + f26ef97 commit 12980c3

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

compat/mingw.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -757,17 +757,7 @@ int mingw_stat(const char *file_name, struct stat *buf)
757757
HANDLE hnd;
758758
int result;
759759

760-
/* if symlinks are disabled, use lstat() (without following links) */
761-
if (!has_symlinks) {
762-
result = lstat(file_name, buf);
763-
if (!result && S_ISLNK(buf->st_mode)) {
764-
errno = ELOOP;
765-
return -1;
766-
}
767-
return result;
768-
}
769-
770-
/* otherwise just open the file and let Windows resolve the links */
760+
/* open the file and let Windows resolve the links */
771761
if (xutftowcs_long_path(wfile_name, file_name) < 0)
772762
return -1;
773763
hnd = CreateFileW(wfile_name, 0,

0 commit comments

Comments
 (0)