// clean out quote characters from the name.
for (int i = __check_once_app_path.length() - 1; i >= 0; i--) {
if (__check_once_app_path[i] == '"') __check_once_app_path.zap(i, i);
// clean out quote characters from the name.
for (int i = __check_once_app_path.length() - 1; i >= 0; i--) {
if (__check_once_app_path[i] == '"') __check_once_app_path.zap(i, i);
filename testing(__check_once_app_path);
if (testing.had_directory()) return __check_once_app_path; // all set.
filename testing(__check_once_app_path);
if (testing.had_directory()) return __check_once_app_path; // all set.
-//hmmm: the below might be better off as a find app in path method, which relies on which.
-printf("no dir part found, app name after chewing: %s\n", __check_once_app_path.s());
+//printf("no dir part found, app name after chewing: %s\n", __check_once_app_path.s());
+ a_sprintf("/zz_cmdfind.%d", chaos().inclusive(0, 999999999)));
system((astring("which ") + __check_once_app_path + " >" + temp_filename).s());
FILE *which_file = fopen(temp_filename.s(), "r");
+ a_sprintf("/zz_cmdfind.%d", chaos().inclusive(0, 999999999)));
system((astring("which ") + __check_once_app_path + " >" + temp_filename).s());
FILE *which_file = fopen(temp_filename.s(), "r");
// the maximum length of the entry stored for the log path.
astring application_configuration::get_logging_directory()
{
// the maximum length of the entry stored for the log path.
astring application_configuration::get_logging_directory()
{
- // start with the root of our installation.
- astring def_log = application_directory();
+ // new scheme is to just use the temporary directory, which can vary per user
+ // and which hopefully is always set to something usable.
+ astring def_log = environment::TMP();
// get the entry for the logging path.
if (!log_dir) {
// if the entry was absent, we set it.
// get the entry for the logging path.
if (!log_dir) {
// if the entry was absent, we set it.
ini_configurator ini(application_configuration_file(),
ini_configurator::RETURN_ONLY,
ini_configurator::APPLICATION_DIRECTORY);
ini_configurator ini(application_configuration_file(),
ini_configurator::RETURN_ONLY,
ini_configurator::APPLICATION_DIRECTORY);
// they gave us something. let's replace the environment variables
// in their string so we resolve paths and such.
log_dir = parser_bits::substitute_env_vars(log_dir);
// they gave us something. let's replace the environment variables
// in their string so we resolve paths and such.
log_dir = parser_bits::substitute_env_vars(log_dir);