Skip to content

Commit

Permalink
Merge branch 'master' of github.com:agner/agner
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Feb 12, 2011
2 parents c9bfa6a + 7acb9dc commit 1acb937
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/agner_github.erl
Expand Up @@ -154,6 +154,8 @@ spec(Name, Version) ->
At when is_list(At) ->
DotDir = filename:join("/tmp","agner"),
filelib:ensure_dir(DotDir ++ "/"),
{ok, #file_info{mode = Mode}} = file:read_file_info(DotDir),
file:change_mode(DotDir, Mode bor 8#0222 bor 8#0444),
AtFilename = filename:join([DotDir, "cache." ++ Name ++ integer_to_list(erlang:phash2(Version)) ++
lists:map(fun ($/) ->
$_;
Expand Down Expand Up @@ -216,7 +218,7 @@ httpc_request_1(URL, Opts) ->
httpc:request(get,{URL,
[]},
[{timeout, 60000}],
Opts ++ [{body_format, binary}],
[{body_format, binary}|Opts],
agner).

parse_response({ok, {{"HTTP/1.1",200,_},_Headers,Body}}) ->
Expand Down

0 comments on commit 1acb937

Please sign in to comment.