Open LoveChina-3000 opened 2 years ago
In line 879 code,On 32-bite ,Get file size error,I modified part of the code 。
inline unsigned __int64 query_file_size(file_handle_type handle, std::error_code& error) { error.clear();
// LARGE_INTEGER file_size; // if(::GetFileSizeEx(handle, &file_size) == 0) // { // error = detail::last_error(); // return 0; // } //return static_cast(file_size.QuadPart);
DWORD dwFileSizeHigh; __int64 qwFileSize = GetFileSize(handle, &dwFileSizeHigh); qwFileSize += (((_int64)dwFileSizeHigh) << 32); return qwFileSize;
struct stat sbuf; if(::fstat(handle, &sbuf) == -1) { error = detail::last_error(); return 0; } return sbuf.st_size;
}
In line 879 code,On 32-bite ,Get file size error,I modified part of the code 。
inline unsigned __int64 query_file_size(file_handle_type handle, std::error_code& error) { error.clear();
ifdef _WIN32
// LARGE_INTEGER file_size; // if(::GetFileSizeEx(handle, &file_size) == 0) // { // error = detail::last_error(); // return 0; // } //return static_cast(file_size.QuadPart);
else // POSIX
endif
}