浏览代码

POSIX version of __PHYSFS_platformStat() now reports symlinks correctly.

Ryan C. Gordon 13 年之前
父节点
当前提交
259399124a
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/platform_posix.c

+ 6 - 0
src/platform_posix.c

@@ -367,6 +367,12 @@ int __PHYSFS_platformStat(const char *filename, int *exists, PHYSFS_Stat *st)
         st->filesize = 0;
         st->filesize = 0;
     } /* else if */
     } /* else if */
 
 
+    else if(S_ISLNK(statbuf.st_mode))
+    {
+        st->filetype = PHYSFS_FILETYPE_SYMLINK;
+        st->filesize = 0;
+    } /* else if */
+
     else
     else
     {
     {
         st->filetype = PHYSFS_FILETYPE_OTHER;
         st->filetype = PHYSFS_FILETYPE_OTHER;