platform/beos.cpp
changeset 362 ac8c846a0a66
parent 327 76e207c6b4a7
child 393 468f75bf4d7d
equal deleted inserted replaced
361:0f945e89d537 362:ac8c846a0a66
   226     if (leaf != NULL)
   226     if (leaf != NULL)
   227         *(leaf++) = '\0';
   227         *(leaf++) = '\0';
   228 
   228 
   229     BPath normalized(str, leaf, true);  /* force normalization of path. */
   229     BPath normalized(str, leaf, true);  /* force normalization of path. */
   230     const char *resolved_path = normalized.Path();
   230     const char *resolved_path = normalized.Path();
   231     BAIL_IF_MACRO(resolved_path == NULL, ERR_FILE_NOT_FOUND, NULL);
   231     BAIL_IF_MACRO(resolved_path == NULL, ERR_NO_SUCH_FILE, NULL);
   232     char *retval = (char *) malloc(strlen(resolved_path) + 1);
   232     char *retval = (char *) malloc(strlen(resolved_path) + 1);
   233     BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
   233     BAIL_IF_MACRO(retval == NULL, ERR_OUT_OF_MEMORY, NULL);
   234     strcpy(retval, resolved_path);
   234     strcpy(retval, resolved_path);
   235     return(retval);
   235     return(retval);
   236 } /* __PHYSFS_platformRealPath */
   236 } /* __PHYSFS_platformRealPath */