X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-boot-editor.c;fp=ui%2Fncurses%2Fnc-boot-editor.c;h=89910951db610d311501337dfd45d001d56fd1ad;hp=7fa1a42f0eddfbc07794b9f003c4dbfd330dfac6;hb=63271b068064caea5f148f6bd6728adabef5cf87;hpb=c7202ebe8fe98afb3e5b73bbdb78db652e8df5d1 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);