diff options
Diffstat (limited to 'src/kernel/window.c')
-rw-r--r-- | src/kernel/window.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/kernel/window.c b/src/kernel/window.c index 69babe4..9398420 100644 --- a/src/kernel/window.c +++ b/src/kernel/window.c @@ -409,7 +409,7 @@ struct window_action next_window_action(struct window *w) { return *action; } -#define RUN_COMMAND_FILE "sys/winspace.rc" +#define RUN_COMMAND_FILE "/sys/winspace.rc" enum wm_action { WM_MOVE_LEFT, @@ -462,7 +462,10 @@ void init_win() { mouse_y = (VBE_MODE_INFO->height - MOUSE_HEIGHT) / 2; blit_mouse(); - const file_id_t fid = drives->get_file(drives, RUN_COMMAND_FILE); + const struct drive *d; + const char *f; + map_path(RUN_COMMAND_FILE, &d, &f); + const file_id_t fid = drives->get_file(d, f); if (!fid) PANIC("Couldn't open " RUN_COMMAND_FILE "."); @@ -519,8 +522,11 @@ void on_action(struct window_action packet) { paint_all(); } break; + const struct drive *d; + const char *f; case WM_RUN_COMMAND: - if (!try_elf_run(drives, run_command, run_command_pass, 0)) + map_path(run_command, &d, &f); + if (!try_elf_run(d, f, run_command_pass, 0)) logf(LOG_ERROR, "Couldn't run program listed in " RUN_COMMAND_FILE "."); break; } |