summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_vm_command.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/mix_vm_command.c')
-rw-r--r--mixlib/mix_vm_command.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mixlib/mix_vm_command.c b/mixlib/mix_vm_command.c
index bb4b67f..9344618 100644
--- a/mixlib/mix_vm_command.c
+++ b/mixlib/mix_vm_command.c
@@ -37,6 +37,9 @@
# include <readline/history.h>
#endif
+#ifdef HAVE_LIBREADLINE
+# include <readline/readline.h>
+#endif
/* hooks */
typedef struct
@@ -268,14 +271,14 @@ mix_vm_cmd_dispatcher_new_with_config (FILE *out, FILE *err,
val = mix_config_get (result->config, TIMING_KEY_);
if (val) cmd_timing_ (result, val);
val = mix_config_get_devices_dir (result->config);
- if (!val)
+ if (!val || !mix_stat_dir (val, "devices"))
{
gchar *dirname = g_dirname (mix_config_get_filename (config));
cmd_devdir_ (result, dirname);
g_free (dirname);
}
else
- cmd_devdir_ (result, val);
+ mix_device_set_dir (val);
#ifdef HAVE_LIBHISTORY
val = mix_config_get_history_file (result->config);
hsize = mix_config_get_history_size (result->config);
@@ -361,7 +364,7 @@ mix_vm_cmd_dispatcher_get_src_file_path (const mix_vm_cmd_dispatcher_t *dis)
g_free (PATH);
PATH = NULL;
}
-
+
if (f)
PATH = mix_file_complete_name (mix_src_file_get_path (f), MIX_SRC_DEFEXT);