diff --git a/cmd.c b/cmd.c index 5e2abfec..fbcde912 100644 --- a/cmd.c +++ b/cmd.c @@ -1309,7 +1309,8 @@ cmd_get_default_path(struct cmd_ctx *ctx, const char *cwd) else return (s->cwd); skip = 0; - goto complete_path; + if (root != NULL) + goto complete_path; } return (s->cwd);