physfs.c
changeset 41 ff60d39d0862
parent 39 bc29e1ee7ef6
child 44 534901592376
equal deleted inserted replaced
40:8cc16df4bada 41:ff60d39d0862
  1020 {
  1020 {
  1021     DirInfo *i;
  1021     DirInfo *i;
  1022     char **retval = NULL;
  1022     char **retval = NULL;
  1023     LinkedStringList *rc;
  1023     LinkedStringList *rc;
  1024     LinkedStringList *finalList = NULL;
  1024     LinkedStringList *finalList = NULL;
       
  1025     int omitSymLinks = !allowSymLinks;
  1025 
  1026 
  1026     while (*path == '/')
  1027     while (*path == '/')
  1027         path++;
  1028         path++;
  1028 
  1029 
  1029     for (i = searchPath; i != NULL; i = i->next)
  1030     for (i = searchPath; i != NULL; i = i->next)
  1030     {
  1031     {
  1031         DirHandle *h = i->dirHandle;
  1032         DirHandle *h = i->dirHandle;
  1032         if (__PHYSFS_verifySecurity(h, path))
  1033         if (__PHYSFS_verifySecurity(h, path))
  1033         {
  1034         {
  1034             rc = h->funcs->enumerateFiles(h, path);
  1035             rc = h->funcs->enumerateFiles(h, path, omitSymLinks);
  1035             interpolateStringLists(&finalList, rc);
  1036             interpolateStringLists(&finalList, rc);
  1036         } /* if */
  1037         } /* if */
  1037     } /* for */
  1038     } /* for */
  1038 
  1039 
  1039     retval = convertStringListToPhysFSList(finalList);
  1040     retval = convertStringListToPhysFSList(finalList);