natFileWin32.cc (attr): Use FindFirstFile( ) instead of GetFileAttributesEx( ) to find file length and...
2002-10-23 Ranjit Mathew <rmathew@hotmail.com> * java/io/natFileWin32.cc (attr): Use FindFirstFile( ) instead of GetFileAttributesEx( ) to find file length and modification times, as the latter is not present on Windows 95. From-SVN: r58466
This commit is contained in:
parent
e6f052b7e6
commit
963f08a97f
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-10-23 Ranjit Mathew <rmathew@hotmail.com>
|
||||||
|
|
||||||
|
* java/io/natFileWin32.cc (attr): Use FindFirstFile( ) instead of
|
||||||
|
GetFileAttributesEx( ) to find file length and modification times,
|
||||||
|
as the latter is not present on Windows 95.
|
||||||
|
|
||||||
2002-10-21 Michael Koch <konqueror@gmx.de>
|
2002-10-21 Michael Koch <konqueror@gmx.de>
|
||||||
|
|
||||||
* java/net/URL.java
|
* java/net/URL.java
|
||||||
|
|
|
@ -83,10 +83,13 @@ java::io::File::attr (jint query)
|
||||||
|
|
||||||
JvAssert (query == MODIFIED || query == LENGTH);
|
JvAssert (query == MODIFIED || query == LENGTH);
|
||||||
|
|
||||||
WIN32_FILE_ATTRIBUTE_DATA info;
|
WIN32_FIND_DATA info;
|
||||||
if (! GetFileAttributesEx(buf, GetFileExInfoStandard, &info))
|
HANDLE sHandle;
|
||||||
|
if ( ( sHandle = FindFirstFile( buf, &info)) == INVALID_HANDLE_VALUE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
FindClose( sHandle);
|
||||||
|
|
||||||
if (query == LENGTH)
|
if (query == LENGTH)
|
||||||
return ((long long)info.nFileSizeHigh) << 32 | (unsigned long long)info.nFileSizeLow;
|
return ((long long)info.nFileSizeHigh) << 32 | (unsigned long long)info.nFileSizeLow;
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue