projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7202eb
)
ui/ncurses: Fix adding unnecessary leading slashes to paths
author
Samuel Mendoza-Jonas
<sam@mendozajonas.com>
Mon, 20 Feb 2017 05:24:47 +0000
(16:24 +1100)
committer
Samuel Mendoza-Jonas
<sam@mendozajonas.com>
Wed, 15 Mar 2017 05:29:57 +0000
(16:29 +1100)
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses/nc-boot-editor.c
patch
|
blob
|
history
diff --git
a/ui/ncurses/nc-boot-editor.c
b/ui/ncurses/nc-boot-editor.c
index 7fa1a42f0eddfbc07794b9f003c4dbfd330dfac6..89910951db610d311501337dfd45d001d56fd1ad 100644
(file)
--- 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);