POSIX version of __PHYSFS_platformStat() now reports symlinks correctly.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 29 Nov 2012 11:45:01 -0500
changeset 1323 61ca5d6011df
parent 1322 5476917b8ddf
child 1324 d12c1c033a7d
POSIX version of __PHYSFS_platformStat() now reports symlinks correctly.
src/platform_posix.c
--- a/src/platform_posix.c	Wed Nov 28 01:36:13 2012 -0500
+++ b/src/platform_posix.c	Thu Nov 29 11:45:01 2012 -0500
@@ -367,6 +367,12 @@
         st->filesize = 0;
     } /* else if */
 
+    else if(S_ISLNK(statbuf.st_mode))
+    {
+        st->filetype = PHYSFS_FILETYPE_SYMLINK;
+        st->filesize = 0;
+    } /* else if */
+
     else
     {
         st->filetype = PHYSFS_FILETYPE_OTHER;