- char buf[256];
- snprintf(buf, sizeof buf, "./scripts/%s%s", script_name, suffix);
-
- printf("--- Executing: %s, args'%s'\n",buf,arguments);
+ char script_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + strlen(script_name) + strlen(suffix) + 1];
+ strcpy(script_path, get_my_executable_directory());
+ strcat(script_path, LUA_SCRIPTS_DIRECTORY);
+ strcat(script_path, script_name);
+ strcat(script_path, suffix);