Commit 963f08a9 by Ranjit Mathew Committed by Adam Megacz

natFileWin32.cc (attr): Use FindFirstFile( ) instead of GetFileAttributesEx( )…

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
parent e6f052b7
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>
* java/net/URL.java
......
......@@ -83,10 +83,13 @@ java::io::File::attr (jint query)
JvAssert (query == MODIFIED || query == LENGTH);
WIN32_FILE_ATTRIBUTE_DATA info;
if (! GetFileAttributesEx(buf, GetFileExInfoStandard, &info))
WIN32_FIND_DATA info;
HANDLE sHandle;
if ( ( sHandle = FindFirstFile( buf, &info)) == INVALID_HANDLE_VALUE)
return 0;
FindClose( sHandle);
if (query == LENGTH)
return ((long long)info.nFileSizeHigh) << 32 | (unsigned long long)info.nFileSizeLow;
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment