diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-19 14:55:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-19 14:55:47 (GMT) |
commit | 5240a88aa55a77abb6e62d887b7f28e8ed89076f (patch) | |
tree | fc808e2d2b49757f4b55b024665434ad0cbe8ec2 /win | |
parent | a515c79f52c3d0927a7377700467074b80b8d169 (diff) | |
download | tcl-5240a88aa55a77abb6e62d887b7f28e8ed89076f.zip tcl-5240a88aa55a77abb6e62d887b7f28e8ed89076f.tar.gz tcl-5240a88aa55a77abb6e62d887b7f28e8ed89076f.tar.bz2 |
Handle the (unlikely) case that the file is deleted in between. Suggested by Harald Oehlmann (Thanks!)
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinFile.c | 4 |
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); } |