aboutsummaryrefslogtreecommitdiffstats
path: root/examples/web_server/src/directory_lister.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web_server/src/directory_lister.erl')
-rw-r--r--examples/web_server/src/directory_lister.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/web_server/src/directory_lister.erl b/examples/web_server/src/directory_lister.erl
index aa36314..79d5ea3 100644
--- a/examples/web_server/src/directory_lister.erl
+++ b/examples/web_server/src/directory_lister.erl
@@ -14,8 +14,8 @@ execute(Req, Env) ->
redirect_directory(Req, Env) ->
{Path, Req1} = cowboy_req:path_info(Req),
Path1 = << <<S/binary, $/>> || S <- Path >>,
- {handler_opts, StaticOpts} = lists:keyfind(handler_opts, 1, Env),
- {dir_handler, DirHandler} = lists:keyfind(dir_handler, 1, StaticOpts),
+ {handler_opts, {_, _, _, Extra}} = lists:keyfind(handler_opts, 1, Env),
+ {dir_handler, DirHandler} = lists:keyfind(dir_handler, 1, Extra),
FullPath = resource_path(Path1),
case valid_path(Path) and filelib:is_dir(FullPath) of
true -> handle_directory(Req1, Env, Path1, FullPath, DirHandler);