SisMaker 4 年之前
父節點
當前提交
2dafe06a64
共有 1 個檔案被更改,包括 6 行新增6 行删除
  1. +6
    -6
      src/sync/esUtils.erl

+ 6
- 6
src/sync/esUtils.erl 查看文件

@ -105,16 +105,16 @@ tryGetSrcOptions(SrcDir) ->
fun(OneFiles, Acc) -> fun(OneFiles, Acc) ->
Mod = binary_to_atom(filename:basename(OneFiles, filename:extension(OneFiles))), Mod = binary_to_atom(filename:basename(OneFiles, filename:extension(OneFiles))),
case getModOptions(Mod) of case getModOptions(Mod) of
{ok, Options} ->
throw({ok, Options});
{ok, _Options} = Opts ->
throw(Opts);
_ -> _ ->
Acc Acc
end end
end, undefined) end, undefined)
catch catch
{ok, Options} ->
{ok, Options} = Opts ->
setOptions(SrcDir, Options), setOptions(SrcDir, Options),
{ok, Options};
Opts;
_ExType:_Error -> _ExType:_Error ->
Msg = [io_lib:format("looking src options error ~p:~p. ~n", [_ExType, _Error])], Msg = [io_lib:format("looking src options error ~p:~p. ~n", [_ExType, _Error])],
logWarnings(Msg), logWarnings(Msg),
@ -193,14 +193,14 @@ getFileType(Source) ->
determineIncludeDir(IncludeDir, BeamDir, SrcDir) -> determineIncludeDir(IncludeDir, BeamDir, SrcDir) ->
IncludeBase = filename:basename(IncludeDir), IncludeBase = filename:basename(IncludeDir),
case determineIncludeDirFromBeamDir(IncludeBase, IncludeDir, BeamDir) of case determineIncludeDirFromBeamDir(IncludeBase, IncludeDir, BeamDir) of
{ok, D} -> {ok, D};
{ok, _Dir} = RetD -> RetD;
undefined -> undefined ->
{ok, Cwd} = file:get_cwd(), {ok, Cwd} = file:get_cwd(),
% Cwd2 = normalizeCaseWindowsDir(Cwd), % Cwd2 = normalizeCaseWindowsDir(Cwd),
% SrcDir2 = normalizeCaseWindowsDir(SrcDir), % SrcDir2 = normalizeCaseWindowsDir(SrcDir),
% IncludeBase2 = normalizeCaseWindowsDir(IncludeBase), % IncludeBase2 = normalizeCaseWindowsDir(IncludeBase),
case findIncludeDirFromAncestors(SrcDir, Cwd, IncludeBase) of case findIncludeDirFromAncestors(SrcDir, Cwd, IncludeBase) of
{ok, D} -> {ok, D};
{ok, _Dir} = RetD -> RetD;
undefined -> {ok, IncludeDir} %% Failed, just stick with original undefined -> {ok, IncludeDir} %% Failed, just stick with original
end end
end. end.

Loading…
取消
儲存