Browse Source

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.
Ryan C. Gordon 8 years ago
parent
commit
114bfd1b21
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/physfs_platform_windows.c

+ 1 - 2
src/physfs_platform_windows.c

@@ -997,8 +997,7 @@ int __PHYSFS_platformStat(const char *filename, PHYSFS_Stat *st)
     else if (winstat.dwFileAttributes & (FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_DEVICE))
     else if (winstat.dwFileAttributes & (FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_DEVICE))
     {
     {
         st->filetype = PHYSFS_FILETYPE_OTHER;
         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 if */
 
 
     else
     else