summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-19 11:55:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-19 11:55:47 (GMT)
commitf2d88e1f7dc522d9ac01e17c953084002923ecfa (patch)
treeeba851a5ae0dbdcc04ae44d807681141d210fcac /win
parent1fdd38f7039a6f414008a01436898a276c4e835d (diff)
downloadtcl-f2d88e1f7dc522d9ac01e17c953084002923ecfa.zip
tcl-f2d88e1f7dc522d9ac01e17c953084002923ecfa.tar.gz
tcl-f2d88e1f7dc522d9ac01e17c953084002923ecfa.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.c29
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;