windows: PHYSFS_FILETYPE_OTHER files now report real filesize in PHYSFS_stat().

I don't know if it's _meaningful_, but if the OS reports it, so do we.
This commit is contained in:
Ryan C. Gordon 2017-08-06 09:25:05 -04:00
parent a7ce178eec
commit 114bfd1b21
1 changed files with 1 additions and 2 deletions

View File

@ -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