fix GetSize() for large files (patch 1680876) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,10 +95,17 @@ wxMac
|
|||||||
|
|
||||||
- Corrected top border size for wxStaticBox with empty label (nusi)
|
- Corrected top border size for wxStaticBox with empty label (nusi)
|
||||||
|
|
||||||
|
wxMSW:
|
||||||
|
|
||||||
|
- Fixed wxFileName::GetSize() for large files
|
||||||
|
|
||||||
|
|
||||||
2.8.2
|
2.8.2
|
||||||
-----
|
-----
|
||||||
|
|
||||||
All:
|
All:
|
||||||
|
<<<<<<< changes.txt
|
||||||
|
=======
|
||||||
|
|
||||||
- Added wxSizerFlags::Shaped(), FixedMinSize(), Top() and Bottom() methods.
|
- Added wxSizerFlags::Shaped(), FixedMinSize(), Top() and Bottom() methods.
|
||||||
- Added wxCSConv::IsOk() (Manuel Martin).
|
- Added wxCSConv::IsOk() (Manuel Martin).
|
||||||
@@ -118,9 +125,21 @@ All:
|
|||||||
- Fix handling of wxSOCKET_REUSEADDR in wxDatagramSocket (troelsk)
|
- Fix handling of wxSOCKET_REUSEADDR in wxDatagramSocket (troelsk)
|
||||||
|
|
||||||
Unix Ports:
|
Unix Ports:
|
||||||
|
>>>>>>> 1.1006.2.13
|
||||||
|
|
||||||
|
<<<<<<< changes.txt
|
||||||
|
- Added wxSizerFlags::Shaped(), FixedMinSize(), Top() and Bottom() methods
|
||||||
|
- Added wxCSConv::IsOk() (Manuel Martin)
|
||||||
|
- Added wxDateTime::GetDateOnly()
|
||||||
|
- Made wxTextFile work with unseekable files again (David Hart)
|
||||||
|
- Added wxCONFIG_USE_SUBDIR flag to wxFileConfig (Giuseppe Bilotta)
|
||||||
|
- Added wxSearchCtrl::[Get|Set]DescriptiveText
|
||||||
|
- Added wxToolBar::SetTool[Normal|Disabled]Bitmap for wxMSW, wxGTK and wxMac
|
||||||
|
|
||||||
|
=======
|
||||||
- Fixed crash in wxGetUserName() in Unicode build
|
- Fixed crash in wxGetUserName() in Unicode build
|
||||||
|
|
||||||
|
>>>>>>> 1.1006.2.13
|
||||||
wxMSW
|
wxMSW
|
||||||
|
|
||||||
- Fix lack of spin control update event when control lost focus.
|
- Fix lack of spin control update event when control lost focus.
|
||||||
|
@@ -2328,14 +2328,11 @@ wxULongLong wxFileName::GetSize(const wxString &filename)
|
|||||||
|
|
||||||
DWORD lpFileSizeHigh;
|
DWORD lpFileSizeHigh;
|
||||||
DWORD ret = GetFileSize(f, &lpFileSizeHigh);
|
DWORD ret = GetFileSize(f, &lpFileSizeHigh);
|
||||||
if (ret == INVALID_FILE_SIZE)
|
if ( ret == INVALID_FILE_SIZE && ::GetLastError() != NO_ERROR )
|
||||||
return wxInvalidSize;
|
return wxInvalidSize;
|
||||||
|
|
||||||
// compose the low-order and high-order byte sizes
|
return wxULongLong(lpFileSizeHigh, ret);
|
||||||
return wxULongLong(ret | (lpFileSizeHigh << sizeof(WORD)*2));
|
#else // ! __WIN32__
|
||||||
|
|
||||||
#else // ! __WIN32__
|
|
||||||
|
|
||||||
wxStructStat st;
|
wxStructStat st;
|
||||||
#ifndef wxNEED_WX_UNISTD_H
|
#ifndef wxNEED_WX_UNISTD_H
|
||||||
if (wxStat( filename.fn_str() , &st) != 0)
|
if (wxStat( filename.fn_str() , &st) != 0)
|
||||||
|
Reference in New Issue
Block a user