6819689: File.lastModified can return bogus value for remote file accessed as it is being deleted [win]
Reviewed-by: sherman
This commit is contained in:
parent
a2b46bd320
commit
4654daefa2
@ -309,12 +309,13 @@ Java_java_io_WinNTFileSystem_getLastModifiedTime(JNIEnv *env, jobject this,
|
||||
/* No template file */
|
||||
NULL);
|
||||
if (h != INVALID_HANDLE_VALUE) {
|
||||
GetFileTime(h, NULL, NULL, &t);
|
||||
if (GetFileTime(h, NULL, NULL, &t)) {
|
||||
modTime.LowPart = (DWORD) t.dwLowDateTime;
|
||||
modTime.HighPart = (LONG) t.dwHighDateTime;
|
||||
rv = modTime.QuadPart / 10000;
|
||||
rv -= 11644473600000;
|
||||
}
|
||||
CloseHandle(h);
|
||||
modTime.LowPart = (DWORD) t.dwLowDateTime;
|
||||
modTime.HighPart = (LONG) t.dwHighDateTime;
|
||||
rv = modTime.QuadPart / 10000;
|
||||
rv -= 11644473600000;
|
||||
}
|
||||
free(pathbuf);
|
||||
return rv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user