Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
windows: PHYSFS_FILETYPE_OTHER files now report real filesize in PHYS…
…FS_stat().

I don't know if it's _meaningful_, but if the OS reports it, so do we.
  • Loading branch information
icculus committed Aug 6, 2017
1 parent a7ce178 commit 114bfd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/physfs_platform_windows.c
Expand Up @@ -997,8 +997,7 @@ int __PHYSFS_platformStat(const char *filename, PHYSFS_Stat *st)
else if (winstat.dwFileAttributes & (FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_DEVICE))
{
st->filetype = PHYSFS_FILETYPE_OTHER;
/* !!! FIXME: don't rely on this */
st->filesize = 0;
st->filesize = (((PHYSFS_uint64) winstat.nFileSizeHigh) << 32) | winstat.nFileSizeLow;
} /* else if */

else
Expand Down

0 comments on commit 114bfd1

Please sign in to comment.