diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-19 11:55:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-19 11:55:47 (GMT) |
commit | 2d0dd29466f03e0fc1db5e44ab8325ec3e627395 (patch) | |
tree | eba851a5ae0dbdcc04ae44d807681141d210fcac /win | |
parent | 28d2c1e4cf3023a3682139dc1c398e401be10a72 (diff) | |
download | tcl-2d0dd29466f03e0fc1db5e44ab8325ec3e627395.zip tcl-2d0dd29466f03e0fc1db5e44ab8325ec3e627395.tar.gz tcl-2d0dd29466f03e0fc1db5e44ab8325ec3e627395.tar.bz2 |
Back out bug fix for [Bug 2893771], because it was the cause of the regression.
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinFile.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 18b05d6..989836f 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1534,19 +1534,11 @@ NativeAccess( if (attr == INVALID_FILE_ATTRIBUTES) { /* - * File might not exist. + * File doesn't exist. */ - WIN32_FIND_DATA ffd; - HANDLE hFind; - hFind = FindFirstFile(nativePath, &ffd); - if (hFind != INVALID_HANDLE_VALUE) { - attr = ffd.dwFileAttributes; - FindClose(hFind); - } else { - TclWinConvertError(GetLastError()); - return -1; - } + TclWinConvertError(GetLastError()); + return -1; } if (mode == F_OK) { @@ -2002,19 +1994,8 @@ NativeStat( if (GetFileAttributesEx(nativePath, GetFileExInfoStandard, &data) != TRUE) { - /* - * We might have just been denied access - */ - - WIN32_FIND_DATA ffd; - HANDLE hFind = FindFirstFile(nativePath, &ffd); - - if (hFind == INVALID_HANDLE_VALUE) { - Tcl_SetErrno(ENOENT); - return -1; - } - memcpy(&data, &ffd, sizeof(data)); - FindClose(hFind); + Tcl_SetErrno(ENOENT); + return -1; } attr = data.dwFileAttributes; |