summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 8e41096..22fc6f3 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1892,11 +1892,17 @@ NativeStat(nativePath, statPtr, checkLinks)
if((*tclWinProcs->getFileAttributesExProc)(nativePath,
GetFileExInfoStandard,
&data) != TRUE) {
+ HANDLE hFind;
+ WIN32_FIND_DATAT ffd;
DWORD lasterror = GetLastError();
+
if (lasterror != ERROR_SHARING_VIOLATION) {
TclWinConvertError(lasterror);
return -1;
}
+ hFind = (*tclWinProcs->findFirstFileProc)(nativePath, &ffd);
+ memcpy(&data, &ffd, sizeof(data));
+ FindClose(hFind);
}