Permalink
Browse files

assert return value of filelib:ensure_dir for $HOME/yaws dir

A user reported an installation-related error because of a missing
$HOME/.yaws dir where the CTL file is stored. Assert that
filelib:ensure_dir returns ok for that directory.
  • Loading branch information...
1 parent 9e6c9e1 commit e2e6f66612019204741446472288ece6184c5976 @vinoski vinoski committed Jun 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/yaws_server.erl
View
@@ -120,7 +120,7 @@ l2a(A) when is_atom(A) -> A.
init(Env) -> %% #env{Trace, TraceOut, Conf, RunMod, Embedded, Id}) ->
process_flag(trap_exit, true),
- put(start_time, calendar:local_time ()), %% for uptime
+ put(start_time, calendar:local_time()), %% for uptime
case Env#env.embedded of
false ->
Config = (catch yaws_config:load(Env)),
@@ -521,7 +521,7 @@ gserv(Top, GC, Group0) ->
setup_dirs(GC) ->
Dir = yaws:id_dir(GC#gconf.id),
Ctl = yaws:ctl_file(GC#gconf.id),
- filelib:ensure_dir(Ctl),
+ ok = filelib:ensure_dir(Ctl),
case file:list_dir(Dir) of
{ok, LL} ->
foreach(

0 comments on commit e2e6f66

Please sign in to comment.