diff --git a/cmd.c b/cmd.c index a58b0d58..09b368da 100644 --- a/cmd.c +++ b/cmd.c @@ -1308,7 +1308,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);