summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-20 11:18:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-20 11:18:39 (GMT)
commit1abdef6a10523363f5da7923ff02d13f5bfcd92e (patch)
tree29170a3525491dfd8b4d91ef5526221c991ea024 /win/tclWinFile.c
parent5240a88aa55a77abb6e62d887b7f28e8ed89076f (diff)
downloadtcl-1abdef6a10523363f5da7923ff02d13f5bfcd92e.zip
tcl-1abdef6a10523363f5da7923ff02d13f5bfcd92e.tar.gz
tcl-1abdef6a10523363f5da7923ff02d13f5bfcd92e.tar.bz2
Slightly more correct: If FindFirstFile() fails, the error should be "no such file or directory" (ENOENT) not "permission denied" (EACCES).
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 462de4b..0ff219d 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1902,7 +1902,7 @@ NativeStat(nativePath, statPtr, checkLinks)
}
hFind = (*tclWinProcs->findFirstFileProc)(nativePath, &ffd);
if (hFind == INVALID_HANDLE_VALUE) {
- TclWinConvertError(lasterror);
+ TclWinConvertError(GetLastError());
return -1;
}
memcpy(&data, &ffd, sizeof(data));