0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Squash me, probably needs to use Tabs and NOT spaces

This commit is contained in:
ruanpienaar 2018-11-07 23:43:43 +00:00
parent 0940e725a0
commit 4c796d9aab

View file

@ -42,12 +42,12 @@ list_html(Req, {Path, Fs}) ->
{HTML, Req, Path}.
links(<<>>, "..") ->
["<a href='/", "..", "'>", "..", "</a><br>\n"];
["<a href='/", "..", "'>", "..", "</a><br>\n"];
links(Prefix, "..") ->
Toks = string:tokens(binary_to_list(Prefix), "/"),
Back = lists:join( "/", lists:delete(lists:last(Toks), Toks)),
["<a href='/", "..", $/ ] ++ Back ++ [ "'>", "..", "</a><br>\n"];
Toks = string:tokens(binary_to_list(Prefix), "/"),
Back = lists:join( "/", lists:delete(lists:last(Toks), Toks)),
["<a href='/", "..", $/ ] ++ Back ++ [ "'>", "..", "</a><br>\n"];
links(<<>>, File) ->
["<a href='/", File, "'>", File, "</a><br>\n"];
["<a href='/", File, "'>", File, "</a><br>\n"];
links(Prefix, File) ->
["<a href='/", Prefix, File, "'>", File, "</a><br>\n"].
["<a href='/", Prefix, File, "'>", File, "</a><br>\n"].