From 67949de0a173901fc741674c31bb971172442ec9 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 6 Feb 2012 17:29:29 +0000 Subject: [PATCH] Don't die if fail to get root directory, from Ben Boeckel. --- cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);