Use prefix 9 instead of 1 to get the executable path, to avoid a length limitation.

This commit is contained in:
Stephen Heumann 2014-11-08 12:26:36 -06:00
parent bff0844d44
commit 8f7e30fc8b

View File

@ -19,7 +19,7 @@ char *get_exec_path(void);
#include <gsos.h>
#include <orca.h>
/* Prefix 1 is set to the directory containing the executable at launch.
/* Prefix 9 is set to the directory containing the executable at launch.
* We append the result of a GetName call to this to get the full pathname.
*/
char *get_exec_path(void) {
@ -32,7 +32,7 @@ char *get_exec_path(void) {
if (prefix == NULL)
return NULL;
prefixRec.pCount = 2;
prefixRec.prefixNum = 1; /* Info for prefix 1 */
prefixRec.prefixNum = 9; /* Info for prefix 9 */
prefixRec.buffer.getPrefix = prefix;
prefix->bufSize = sizeof(ResultBuf255);