mirror of
https://github.com/panda3d/panda3d.git
synced 2026-02-11 17:49:01 -06:00
Fix handling of large (>2GB) files on Windows. Egad, off_t is 32 bits on Windows, even in 64-bit Windows. Ridiculous.
This commit is contained in:
@@ -335,7 +335,7 @@ open_read_append_file(const Filename &file) {
|
||||
// implementations may require this stream to determine
|
||||
// the size.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
off_t VirtualFileMountSystem::
|
||||
streamsize VirtualFileMountSystem::
|
||||
get_file_size(const Filename &file, istream *stream) const {
|
||||
// First, save the original stream position.
|
||||
streampos orig = stream->tellg();
|
||||
@@ -364,7 +364,7 @@ get_file_size(const Filename &file, istream *stream) const {
|
||||
// Description: Returns the current size on disk (or wherever it is)
|
||||
// of the file before it has been opened.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
off_t VirtualFileMountSystem::
|
||||
streamsize VirtualFileMountSystem::
|
||||
get_file_size(const Filename &file) const {
|
||||
Filename pathname(_physical_filename, file);
|
||||
return pathname.get_file_size();
|
||||
|
||||
Reference in New Issue
Block a user