From f2d88e1f7dc522d9ac01e17c953084002923ecfa Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 19 Mar 2013 11:55:47 +0000 Subject: Back out bug fix for [Bug 2893771], because it was the cause of the regression. --- ChangeLog | 5 +++++ win/tclWinFile.c | 29 +++++------------------------ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e3f842..2d75b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-03-19 Jan Nijtmans + + * win/tclWinFile.c: [Bug 3608360]: Back out bug fix + for [Bug 2893771], because it was the cause of the regression. + 2013-03-18 Donal K. Fellows * tests/cmdAH.test (cmdAH-19.12): [Bug 3608360]: Added test to ensure 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; -- cgit v0.12