X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fuser-event.c;h=cf7f20c599bbefdac3c004834dc75966500a7a4b;hp=1e366ee387c6cad138998c2686d6ae0ef0832a51;hb=922756a3aefd8ba5c5675efd37df9f43938cf432;hpb=f66b0807cace1cfda192810861ba6309bf6fa9fe diff --git a/discover/user-event.c b/discover/user-event.c index 1e366ee..cf7f20c 100644 --- a/discover/user-event.c +++ b/discover/user-event.c @@ -290,8 +290,9 @@ struct pb_url *user_event_parse_conf_url(struct discover_context *ctx, /* strip filename from the bootfile path, leaving only a * directory */ p = strrchr(basedir, '/'); - if (p) - *p = '\0'; + if (!p) + p = basedir; + *p = '\0'; if (strlen(basedir)) url_str = talloc_asprintf_append(url_str, "%s/",