diff options
Diffstat (limited to 'core/src/xmake/engine.c')
| -rw-r--r-- | core/src/xmake/engine.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index 2e3ad61b7..eb07fe2b5 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -915,7 +915,13 @@ static tb_bool_t xm_engine_get_program_file(xm_engine_t *engine, tb_char_t **arg if (!ok && argv) { tb_char_t const *p = argv[0]; if (p && tb_file_info(p, tb_null)) { - tb_strlcpy(path, p, maxn); + if (tb_path_is_absolute(p)) { + tb_strlcpy(path, p, maxn); + } else { + if (!tb_path_absolute(p, path, maxn)) { + tb_strlcpy(path, p, maxn); + } + } ok = tb_true; } } |
