Skip to content

Commit

Permalink
Merge pull request #220 from lchiocca/master
Browse files Browse the repository at this point in the history
The stat() method should not be dependent on the core.symlinks config entry
  • Loading branch information
dscho committed Jul 17, 2015
2 parents 658589f + f26ef97 commit 12980c3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 12980c3

Please sign in to comment.