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:
parent
0940e725a0
commit
4c796d9aab
1 changed files with 6 additions and 6 deletions
|
@ -42,12 +42,12 @@ list_html(Req, {Path, Fs}) ->
|
||||||
{HTML, Req, Path}.
|
{HTML, Req, Path}.
|
||||||
|
|
||||||
links(<<>>, "..") ->
|
links(<<>>, "..") ->
|
||||||
["<a href='/", "..", "'>", "..", "</a><br>\n"];
|
["<a href='/", "..", "'>", "..", "</a><br>\n"];
|
||||||
links(Prefix, "..") ->
|
links(Prefix, "..") ->
|
||||||
Toks = string:tokens(binary_to_list(Prefix), "/"),
|
Toks = string:tokens(binary_to_list(Prefix), "/"),
|
||||||
Back = lists:join( "/", lists:delete(lists:last(Toks), Toks)),
|
Back = lists:join( "/", lists:delete(lists:last(Toks), Toks)),
|
||||||
["<a href='/", "..", $/ ] ++ Back ++ [ "'>", "..", "</a><br>\n"];
|
["<a href='/", "..", $/ ] ++ Back ++ [ "'>", "..", "</a><br>\n"];
|
||||||
links(<<>>, File) ->
|
links(<<>>, File) ->
|
||||||
["<a href='/", File, "'>", File, "</a><br>\n"];
|
["<a href='/", File, "'>", File, "</a><br>\n"];
|
||||||
links(Prefix, File) ->
|
links(Prefix, File) ->
|
||||||
["<a href='/", Prefix, File, "'>", File, "</a><br>\n"].
|
["<a href='/", Prefix, File, "'>", File, "</a><br>\n"].
|
Loading…
Add table
Add a link
Reference in a new issue