Merge pull request #220 from lchiocca/master

The stat() method should not be dependent on the core.symlinks config entry
This commit is contained in:
dscho
2015-07-17 15:47:50 +02:00

View File

@@ -757,17 +757,7 @@ int mingw_stat(const char *file_name, struct stat *buf)
HANDLE hnd;
int result;
/* if symlinks are disabled, use lstat() (without following links) */
if (!has_symlinks) {
result = lstat(file_name, buf);
if (!result && S_ISLNK(buf->st_mode)) {
errno = ELOOP;
return -1;
}
return result;
}
/* otherwise just open the file and let Windows resolve the links */
/* open the file and let Windows resolve the links */
if (xutftowcs_long_path(wfile_name, file_name) < 0)
return -1;
hnd = CreateFileW(wfile_name, 0,