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 b5e104f..d4e8ce7 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -2058,6 +2058,10 @@ NativeStat(
return -1;
}
hFind = (*tclWinProcs->findFirstFileProc)(nativePath, &ffd);
+ if (hFind == INVALID_HANDLE_VALUE) {
+ TclWinConvertError(lasterror);
+ return -1;
+ }
memcpy(&data, &ffd, sizeof(data));
FindClose(hFind);
}