Merge pull request #134 from filmor/patch-1

Use environment variables to find the tmp directory
This commit is contained in:
Tristan Sloughter 2018-06-14 08:07:22 -06:00 committed by GitHub
commit e0453faf8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -277,9 +277,15 @@ remove_recursive(Path, Options) ->
tmp() -> tmp() ->
case erlang:system_info(system_architecture) of case erlang:system_info(system_architecture) of
"win32" -> "win32" ->
"./tmp"; case os:getenv("TEMP") of
false -> "./tmp";
Val -> Val
end;
_SysArch -> _SysArch ->
"/tmp" case os:getenv("TMPDIR") of
false -> "/tmp";
Val -> Val
end
end. end.
%% Copy the subfiles of the From directory to the to directory. %% Copy the subfiles of the From directory to the to directory.