summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-boot-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ncurses/nc-boot-editor.c')
-rw-r--r--ui/ncurses/nc-boot-editor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/ncurses/nc-boot-editor.c b/ui/ncurses/nc-boot-editor.c
index 7fa1a42..8991095 100644
--- a/ui/ncurses/nc-boot-editor.c
+++ b/ui/ncurses/nc-boot-editor.c
@@ -162,7 +162,8 @@ static char *conditional_prefix(struct pb_boot_data *ctx,
sep = "";
if (!prefix)
prefix = "";
- else if (prefix[strlen(prefix)] != '/')
+ else if ((prefix[strlen(prefix) - 1] != '/') &&
+ (value[0] != '/'))
sep = "/";
return talloc_asprintf(ctx, "%s%s%s", prefix, sep, value);
OpenPOWER on IntegriCloud