summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/tclWinFile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 22fc6f3..462de4b 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1901,6 +1901,10 @@ NativeStat(nativePath, statPtr, checkLinks)
return -1;
}
hFind = (*tclWinProcs->findFirstFileProc)(nativePath, &ffd);
+ if (hFind == INVALID_HANDLE_VALUE) {
+ TclWinConvertError(lasterror);
+ return -1;
+ }
memcpy(&data, &ffd, sizeof(data));
FindClose(hFind);
}