Skip to content

Commit

Permalink
unix: OS-specific paths should also chop filename off base path.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 13, 2017
1 parent 187d04a commit a681fe2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/platform_unix.c
Expand Up @@ -271,14 +271,11 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
}
#endif

if (retval)
return retval; /* already got it. */

/* If there's a Linux-like /proc filesystem, you can get the full path to
* the current process from a symlink in there.
*/

if (access("/proc", F_OK) == 0)
if (!retval && (access("/proc", F_OK) == 0))
{
retval = readSymLink("/proc/self/exe");
if (!retval) retval = readSymLink("/proc/curproc/file");
Expand Down

0 comments on commit a681fe2

Please sign in to comment.