Allow .. in paths for userctl
This commit is contained in:
@@ -12,12 +12,12 @@ static void append_entry(Noh_String *response, SV url, Library_Entry entry) {
|
||||
noh_string_append_cstr(response, noh_arena_sprintf(&temp, "<updated>%s</updated>", format_time(entry)));
|
||||
if (entry.is_dir) {
|
||||
SV opds = sv("opds");
|
||||
Noh_String entry_url = build_path(true, &opds, &url, &entry.name);
|
||||
Noh_String entry_url = build_path(true, false, &opds, &url, &entry.name);
|
||||
noh_string_append_cstr(response, noh_arena_sprintf(&temp, "<link rel=\"subsection\" href=\""Nsv_Fmt"\" type=\"application/atom+xml;profile=opds-catalog;kind=navigation\"/>", Nsv_Arg(entry_url)));
|
||||
noh_string_free(&entry_url);
|
||||
} else {
|
||||
SV get = sv("get");
|
||||
Noh_String entry_url = build_path(true, &get, &url, &entry.name);
|
||||
Noh_String entry_url = build_path(true, false, &get, &url, &entry.name);
|
||||
noh_string_append_cstr(response, noh_arena_sprintf(&temp, "<link rel=\"http://opds-spec.org/acquisition\" href=\""Nsv_Fmt"\" type=\"application/epub+zip\"/>", Nsv_Arg(entry_url)));
|
||||
noh_string_free(&entry_url);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ static Noh_String create_feed_response(Library_Entry self_path, SV url, Library_
|
||||
noh_string_append_cstr(&response, noh_arena_sprintf(&temp, "<updated>%s</updated>", format_time(self_path)));
|
||||
|
||||
SV opds = sv("opds");
|
||||
Noh_String self_url = build_path(true, &opds, &url);
|
||||
Noh_String self_url = build_path(true, false, &opds, &url);
|
||||
noh_string_append_cstr(&response, noh_arena_sprintf(&temp, "<link rel=\"self\" href=\""Nsv_Fmt"\" type=\"application/atom+xml;profile=opds-catalog;kind=navigation\"/>", Nsv_Arg(self_url)));
|
||||
noh_string_free(&self_url);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user