diff options
author | hypnotoad <yoda@etoyoc.com> | 2013-04-29 12:31:11 (GMT) |
---|---|---|
committer | hypnotoad <yoda@etoyoc.com> | 2013-04-29 12:31:11 (GMT) |
commit | 7e98e681444fc1b49413624707b811aa45a5b6fa (patch) | |
tree | 9624a61058e7f648dd4d3e730572daf142b344c9 /win | |
parent | f23f5f814767bd8ee631943d6a6840ed563e0dea (diff) | |
parent | 1d75b0eb9444d42e7399a40853deb8bb47a88e4d (diff) | |
download | tcl-hypnotoad_prefer_native_8_6.zip tcl-hypnotoad_prefer_native_8_6.tar.gz tcl-hypnotoad_prefer_native_8_6.tar.bz2 |
Bringing patch up to date with the latest trunkhypnotoad_prefer_native_8_6
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 4 | ||||
-rw-r--r-- | win/tclWinFile.c | 25 |
2 files changed, 13 insertions, 16 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 99009b9..6f5211e 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -639,8 +639,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.8.6 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.6.tm; + @echo "Installing package http 2.8.7 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.7.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 18b05d6..8e517d1 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1537,14 +1537,9 @@ NativeAccess( * File might not exist. */ - WIN32_FIND_DATA ffd; - HANDLE hFind; - hFind = FindFirstFile(nativePath, &ffd); - if (hFind != INVALID_HANDLE_VALUE) { - attr = ffd.dwFileAttributes; - FindClose(hFind); - } else { - TclWinConvertError(GetLastError()); + DWORD lasterror = GetLastError(); + if (lasterror != ERROR_SHARING_VIOLATION) { + TclWinConvertError(lasterror); return -1; } } @@ -2002,15 +1997,17 @@ NativeStat( if (GetFileAttributesEx(nativePath, GetFileExInfoStandard, &data) != TRUE) { - /* - * We might have just been denied access - */ - + HANDLE hFind; WIN32_FIND_DATA ffd; - HANDLE hFind = FindFirstFile(nativePath, &ffd); + DWORD lasterror = GetLastError(); + if (lasterror != ERROR_SHARING_VIOLATION) { + TclWinConvertError(lasterror); + return -1; + } + hFind = FindFirstFile(nativePath, &ffd); if (hFind == INVALID_HANDLE_VALUE) { - Tcl_SetErrno(ENOENT); + TclWinConvertError(GetLastError()); return -1; } memcpy(&data, &ffd, sizeof(data)); |