Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't use our own tmpfile(3) implementation

Even though the one in the stdlib is not much better.
  • Loading branch information...
commit 5a8c30a3a5e97755ba6748588b683f1970924cff 1 parent 2483ee4
@jlouis authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/agner.erl
View
7 src/agner.erl
@@ -129,9 +129,7 @@ handle_command(verify, Opts) ->
io:format("ERROR: Can't read ~s: ~p~n",[SpecFile, Reason]);
{ok, Spec} ->
URL = proplists:get_value(url, Spec),
- {A,B,C} = now(),
- N = node(),
- TmpFile = lists:flatten(io_lib:format("/tmp/agner-~p-~p.~p.~p",[N,A,B,C])),
+ TmpFile = temp_name(),
case (catch agner_download:fetch(URL,TmpFile)) of
ok ->
io:format("~nPASSED~n");
@@ -149,6 +147,9 @@ usage() ->
],
getopt:usage(OptSpec, "agner", "[options ...]").
+temp_name() ->
+ %% Yes, the temp_name function lives in the test_server, go figure!
+ test_server:temp_name("/tmp/agner").
%%%===================================================================
%%% API
Please sign in to comment.
Something went wrong with that request. Please try again.