Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

just warn if ebin or include dirs don't exist

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1269 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
commit efcc15b4c5db40061d6510cac8be27a83216c3b0 1 parent 3354e50
Claes Wikstrom authored
Showing with 18 additions and 6 deletions.
  1. +17 −5 src/yaws_config.erl
  2. +1 −1  src/yaws_soap_lib.erl
22 src/yaws_config.erl
View
@@ -417,13 +417,14 @@ fload(FD, globals, GC, C, Cs, Lno, Chars) ->
["ebin_dir", '=', Ebindir] ->
Dir = filename:absname(Ebindir),
- case is_dir(Dir) of
+ case warn_dir("ebin_dir", Dir) of
true ->
fload(FD, globals, GC#gconf{ebin_dir =
[Dir|GC#gconf.ebin_dir]},
C, Cs, Lno+1, Next);
false ->
- {error, ?F("Expect directory at line ~w (ebin_dir: ~s)", [Lno, Dir])}
+ fload(FD, globals, GC, C, Cs, Lno+1, Next)
+
end;
["runmod", '=', Mod0] ->
@@ -470,13 +471,14 @@ fload(FD, globals, GC, C, Cs, Lno, Chars) ->
["include_dir", '=', Incdir] ->
Dir = filename:absname(Incdir),
- case is_dir(Dir) of
+ case warn_dir("include_dir", Dir) of
true ->
fload(FD, globals, GC#gconf{include_dir=
[Dir|GC#gconf.include_dir]},
C, Cs, Lno+1, Next);
false ->
- {error, ?F("Expect directory at line ~w (include_dir: ~s)", [Lno, Dir])}
+ fload(FD, globals, GC, C, Cs, Lno+1, Next)
+
end;
["mnesia_dir", '=', Mnesiadir] ->
@@ -487,7 +489,7 @@ fload(FD, globals, GC, C, Cs, Lno, Chars) ->
fload(FD, globals, GC#gconf{mnesia_dir = Dir},
C, Cs, Lno+1, Next);
false ->
- {error, ?F("Expect directory at line ~w", [Lno])}
+ {error, ?F("Expect mnesia directory at line ~w", [Lno])}
end;
["tmpdir", '=', _TmpDir] ->
@@ -1071,6 +1073,16 @@ is_bool(_) ->
false.
+warn_dir(Type, Dir) ->
+ case is_dir(Dir) of
+ true ->
+ true;
+ false ->
+ error_logger:format("Config Warning: Directory ~s for ~s doesn't exist~n",
+ [Dir, Type]),
+ false
+ end.
+
is_dir(Val) ->
case file:read_file_info(Val) of
{ok, FI} when FI#file_info.type == directory ->
2  src/yaws_soap_lib.erl
View
@@ -551,7 +551,7 @@ searchPorts(BindingName, [Port | Tail], Acc) ->
#port{binding = #qname{localPart = BindingName}} ->
searchPorts(BindingName, Tail, [Port | Acc]);
_ ->
- searchPorts(BindingName, Tail, Ack)
+ searchPorts(BindingName, Tail, Acc)
end.
Please sign in to comment.
Something went wrong with that request. Please try again.