Fixed base directory determination.
This commit is contained in:
parent
8c36e958e2
commit
00267d4023
|
@ -17,7 +17,9 @@
|
||||||
Changed version to 0.1.2.
|
Changed version to 0.1.2.
|
||||||
08282001 - win32.c now checks HOMEDRIVE, HOMEPATH, and HOME when calculating
|
08282001 - win32.c now checks HOMEDRIVE, HOMEPATH, and HOME when calculating
|
||||||
the userdir. Added include files that make it a little closer to
|
the userdir. Added include files that make it a little closer to
|
||||||
compiling under Cygwin. Added a TODO file.
|
compiling under Cygwin. Added a TODO file. Fixed unix.c's
|
||||||
|
__PHYSFS_platformCalcBaseDir() so that it actually works.
|
||||||
|
Changed version to 0.1.3.
|
||||||
|
|
||||||
--ryan. (icculus@clutteredmind.org)
|
--ryan. (icculus@clutteredmind.org)
|
||||||
|
|
||||||
|
|
|
@ -135,9 +135,9 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
|
||||||
BAIL_IF_MACRO(1, ERR_OUT_OF_MEMORY, NULL);
|
BAIL_IF_MACRO(1, ERR_OUT_OF_MEMORY, NULL);
|
||||||
} /* if */
|
} /* if */
|
||||||
strcpy(exe, start);
|
strcpy(exe, start);
|
||||||
if (start[strlen(start) - 1] != '/')
|
if (exe[strlen(exe) - 1] != '/')
|
||||||
strcat(start, "/");
|
strcat(exe, "/");
|
||||||
strcat(start, argv0);
|
strcat(exe, argv0);
|
||||||
if (access(exe, X_OK) != 0)
|
if (access(exe, X_OK) != 0)
|
||||||
free(exe);
|
free(exe);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue